本文介绍了ejuidatetimepicker中的唯一时间选择器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Yii应用程序中使用 ejuidatetimepicker .给定日期和时间选择器.我只想要时间选择器,我尝试使用两个选项mode => 'time'timeOnly=>true.它不起作用.

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.

请找到我下面的代码.

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

推荐答案

我找到了该选项.我们必须使用

I found the option. We have to use

 'timePickerOnly' => 'true',

我已经签入了EJuiDateTimePicker.php

I have checked in EJuiDateTimePicker.php

这篇关于ejuidatetimepicker中的唯一时间选择器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-22 07:31