Only time picker in ejuidatetimepicker

时光毁灭记忆、已成空白 提交于 2020-01-06 13:55:33

问题


I'm using ejuidatetimepicker in my Yii application. Its giving date and time picker. I want only time picker, I have tried with two options mode => 'time' and timeOnly=>true. its not working.

Please find my below code.

   $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,                        
  ),                                        
 ));

回答1:


I found the option. We have to use

 'timePickerOnly' => 'true',

I have checked in EJuiDateTimePicker.php



来源:https://stackoverflow.com/questions/19000836/only-time-picker-in-ejuidatetimepicker

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!