[EXTENSION] Date picker (jQuery UI based)
#21
Posted 09 December 2008 - 04:34 AM
#22
Posted 09 December 2008 - 06:57 AM
#24
Posted 09 December 2008 - 10:02 AM
Quote
Yes, I'm pretty sure I've been able to earlier, but this time something odd happened; first a .tar shows up (normal), then when I extract it I get a dialog box saying "<something> seems to be an archive. Would you like to extract it?" which has never happened before.
Thanks, MetaYii. Turns out I already had tar. Four copies in fact (the more the better! >_<) : P
#26
Posted 17 December 2008 - 02:53 PM
Just a small improvement suggestion:
It will be cool if the extension could take the default language from the application language selection and if it's not set use english as default.
If the default language doesn't exist, then you select english.
#27
Posted 25 December 2008 - 06:18 PM
i've got a problem by setting the attribute name to the following:
array(
'name'=>'filter[fromDay]',
'value'=>$this->Filter['fromDay'],
'theme'=>'cupertino',
'language'=>'de',
'mode'=>'focus',
'fontSize'=>'1.5em',
'dateFormat'=>'dd.mm.yy',
'htmlOptions'=>array(
'size'=>8
)
)
but the Name will then converted to
filter_fromDay
As workaround i changed Line 583
$html = CHtml::textField($this->htmlOptions['id'], $this->value, $this->htmlOptions);
to
$html = CHtml::textField($this->name, $this->value, $this->htmlOptions);
But this will break on future updates....
Greetings from Germay
me23
#29
Posted 25 December 2008 - 10:18 PM
Quote
If the default language doesn't exist, then you select english.
Done in 1.8
#30
Posted 01 January 2009 - 12:17 PM
thanks a lot, works like a charm now.
Greetings from Germany
me23
#31
Posted 02 January 2009 - 11:13 AM
I've just got datepicker working, and i can set the fontSize in the view, but shouldn't it be possible to set it in the config file, so it would be set site wide?
Setting the fontSize:
in the view (works):
<?php $this->widget('application.extensions.juidatepicker.EDatePicker',array('model'=>$weightform,'attribute'=>'date','fontSize'=>'0.8em'))?>in the config (doesn't work - fontSize is ignored):
'juidatepicker'=>array(
'class'=>'application.extensions.juidatepicker.EDatePicker',
'fontSize'=>'0.8em'
),
Regards,
Joel
#32
Posted 02 January 2009 - 01:02 PM
i've got a new issue, by trying to set 'rangeSelect' in options, it seems that the options will be overwritten in Line 546:
if ($this->mode !== 'advanced') {
$this->options = $this->makeOptions($baseUrl);
}
my current Workaround is following:
if ($this->mode !== 'advanced') {
$this->options = array_merge($this->options, $this->makeOptions($baseUrl));
}
and here is the corresponding line in view file:
<?php echo $this->widget('application.extensions.juidatepicker.EDatePicker',
array(
'name'=>'Day',
'value'=>$this->Filter['fromDay'],
'language'=>'de',
'mode'=>'focus',
'dateFormat'=>'dd.mm.yy',
'fontSize'=>'1em',
'options'=>array(
'rangeSelect'=>'true',
'firstDay'=>'1',
),
));?>
I am using the newest Version 1.8.
May be you can take a look if you have the time....
Thank you!
Greetings from Germany
me23
#33
Posted 15 January 2009 - 10:39 AM
Quote
Hi, do you mean in the application configuration?
#34
Posted 15 January 2009 - 01:59 PM
Quote
if ($this->mode !== 'advanced') {
$this->options = $this->makeOptions($baseUrl);
}
Hi me23, sorry for the late answer, I didn't see you post before. Actually the "advanced" mode was a bit redundant, so I opted to not to include it in 1.9. Better yet, the user's options now take precedence over the "templates". Take a look
#35
Posted 16 January 2009 - 04:37 AM
the TIMESTAMP mode is very useful if you are using db dates as integer to be abstracted from the date format of the daabases (mssql, mysql, etc..). I usually use to treat dates al bigint and put inside unix timestamps.
this datepicker has the option to use TIMESTAMP but the little problem is that in this mode in textbox appear unix seconds and this is not very nice to see.
I was thinking if there is a way to post the unix timestamp but to see a normal date in textbox.
#36
Posted 16 January 2009 - 09:28 AM
Quote
I was thinking if there is a way to post the unix timestamp but to see a normal date in textbox.
Hmm, let me check, because I don't think its possible to do this directly with the datepicker jquery widget, because the presentation in the textfield is the same as in the corresponding $_POST... that's the idea behind the format selector.
Anyway, you could use the time extension or PHP's [tt]time[/tt]/[tt]mktime[/tt]/[tt]date[/tt] to convert the date from and to unix timestamps so you can use a nice format in your form and store them as timestamps in your database.
#37
Posted 16 January 2009 - 11:26 AM
Quote
#39
Posted 18 January 2009 - 08:37 AM
anyway this is a solution.
#40
Posted 22 January 2009 - 06:07 AM

Help














