我在Yii应用程序中使用ejuidatetimepicker。它给出了日期和时间选择器。
我只想要时间选择器,我尝试了两个选项mode => 'time'
和timeOnly=>true
。它不起作用。
请找到我的以下代码。
$this->widget( 'application.extensions.timepicker.EJuiDateTimePicker', array(
'model' => $model, // Your model
'attribute' => 'starttime', // Attribute for input
//'mode'=>'time', //Not working Error Message is "Property "EJuiDateTimePicker.mode" is not defined. "
//timeOnly - Default: false - Hide the datepicker and only provide a time interface.
'timeOnly' => true, // Not working Error Message is "Property "EJuiDateTimePicker.timeOnly" is not defined."
'options' => array(
'showOn'=>'focus',
'timeFormat'=>'hh:mm:ss',
'showSecond'=>true,
//'timeOnly' => true, // Not working Error Message is "Property "EJuiDateTimePicker.timeOnly" is not defined."
) ,
'htmlOptions' => array(
'autocomplete' => 'off',
'size' => 10,
'maxlength' => 10,
),
));
答案 0 :(得分:3)
我找到了选项。我们必须使用
'timePickerOnly' => 'true',
我已经检查了EJuiDateTimePicker.php