story
(Petestory)
February 14, 2011, 8:53pm
1
CJuiDatePicker seems to work with Yii 1.1.5, but not Yii 1.1.6. Does anyone know why this is or if I can do something to fix it?
Here’s the simple code from the view displaying the date picker.
<?php
$this->widget('zii.widgets.jui.CJuiDatePicker',
array(
'flat'=>true,
'options'=>array(
'changeMonth'=>'true',
'changeYear'=>'true',
),
'htmlOptions'=>array('name'=>'jrdate')));
?>
tri
(tri - Tommy Riboe)
February 14, 2011, 9:35pm
2
story:
CJuiDatePicker seems to work with Yii 1.1.5, but not Yii 1.1.6. Does anyone know why this is or if I can do something to fix it?
Here’s the simple code from the view displaying the date picker.
<?php
$this->widget('zii.widgets.jui.CJuiDatePicker',
array(
'flat'=>true,
'options'=>array(
'changeMonth'=>'true',
'changeYear'=>'true',
),
'htmlOptions'=>array('name'=>'jrdate')));
?>
I guess it’s related to this issue.
Edit: I can reproduce it if I set flat to true (input field goes away completely).
/Tommy
story
(Petestory)
February 14, 2011, 10:27pm
3
Thanks, but that didn’t work. I never changed the JUI version from 1.8.6 which was installed with Yii 1.1.6. I’m also not attempting to apply any themes from another version – I’m just using the default theme.
Also, the problem isn’t the input field not showing up – that part was intentional. Setting flat to true makes the calendar inline and hides the input field. The problem is that with Yii 1.1.5 I can see the calendar with the above code, but with 1.1.6, I can’t.
tri
(tri - Tommy Riboe)
February 14, 2011, 10:42pm
4
I see, didn’t know that.
Have a look at this issue (I had a certain feeling I saw something recently, mentioning a similar problem). Obviously it’s not fixed yet.
/Tommy
story
(Petestory)
February 14, 2011, 10:48pm
5
I see. I was hoping that wasn’t the case, but thanks for your help. Does anyone know if this is on the bug fix list for the next update?
icicntu
(Icicntu)
February 15, 2011, 12:59am
6
story:
CJuiDatePicker seems to work with Yii 1.1.5, but not Yii 1.1.6. Does anyone know why this is or if I can do something to fix it?
Here’s the simple code from the view displaying the date picker.
<?php
$this->widget('zii.widgets.jui.CJuiDatePicker',
array(
'flat'=>true,
'options'=>array(
'changeMonth'=>'true',
'changeYear'=>'true',
),
'htmlOptions'=>array('name'=>'jrdate')));
?>
Hi story,
Actually, I encounter this problem before (similar but not exactly).
I change the "enableAjaxValidation" attribute by setting to true as follows (inside the view pages):
<?php $form=$this->beginWidget(‘CActiveForm’, array(
'id'=>'message-form',
'enableAjaxValidation'=>true,
)); ?>
Kindly try it out and keep us update of the outcome. Thanks.
Hope it help.
story:
CJuiDatePicker seems to work with Yii 1.1.5, but not Yii 1.1.6. Does anyone know why this is or if I can do something to fix it?
Here’s the simple code from the view displaying the date picker.
<?php
$this->widget('zii.widgets.jui.CJuiDatePicker',
array(
'flat'=>true,
'options'=>array(
'changeMonth'=>'true',
'changeYear'=>'true',
),
'htmlOptions'=>array('name'=>'jrdate')));
?>
Hi may be it is not working because you are saving the date in diff format. plz change your format to database format than only it will be saved correctly i.e. in yyyy-mm-dd format.
so change your datepicker format and check
story
(Petestory)
April 13, 2011, 9:14pm
8
Hi story,
Actually, I encounter this problem before (similar but not exactly).
I change the "enableAjaxValidation" attribute by setting to true as follows (inside the view pages):
<?php
$form=$this->beginWidget('CActiveForm', array(
'id'=>'message-form',
'enableAjaxValidation'=>true,
));
?>
Kindly try it out and keep us update of the outcome. Thanks.
Hope it help.
Hi may be it is not working because you are saving the date in diff format. plz change your format to database format than only it will be saved correctly i.e. in yyyy-mm-dd format.
so change your datepicker format and check
Thanks for the suggestions, folks, and sorry it took me so long to get back to this thread.
Ajax validation isn’t the problem, and neither is the date format.
I simply reverted to 1.1.5, as "flat" seems to not work in 1.1.6.
I intend to update to 1.1.7 soon, and will let you know if that version can handle it. I’ll leave this thread open until I do.
story
(Petestory)
April 15, 2011, 8:51pm
9
Alright, so I’ve updated to Yii 1.1.7, and CJuiDatePicker “flat” works. Thanks for the fix, Yii folks!