0

我在我的 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,                        
  ),                                        
 ));
4

1 回答 1

3

我找到了这个选项。我们必须使用

 'timePickerOnly' => 'true',

我已经检查了 EJuiDateTimePicker.php

于 2013-09-25T09:39:03.860 回答