I use a widgetFactory component for default datepicker settings:
'widgetFactory' => array(
'widgets' => array(
'CJuiDatePicker' => array(
'themeUrl' => 'http://localhost/x/static/css/jqueryui',
'theme' => 'tsdate',
'options'=>array(
'dayNamesMin'=>array('S','M','T','W','T','F','S'),
'firstDay'=>'1',
'hideIfNoPrevNext'=>true,
'numberOfMonths'=>2,
'stepMonths'=>2,
'minDate'=>'0',
),
),
),
When I try to override this in a particular instance as such…
$this->widget('zii.widgets.jui.CJuiDatePicker', array(
'name'=>'BestAndTestEntry[date]',
// additional javascript options for the date picker plugin
'flat'=>false,
'options' => array(
'showOn' => 'both',
'buttonImage' => Yii::app()->params['staticUrl'].'/img/calendar-color.png',
'buttonImageOnly' => false,
'dateFormat' => 'dd/M yy',
'minDate' => '-3m',
'maxDate' => '0',
),
'htmlOptions'=>array(
'class'=>'textBoxDate'
),
I don’t get minDate or maxDate to override the default settings.
What am I doing wrong?