TimeSpinner

Extend from $.fn.spinner.defaults. Override defaults with $.fn.timespinner.defaults.

The timespinner is created based on spinner. It is same as numberspinner but display the time value. The timespinner allows the user to increase or decrease the time by clicking small spinner buttons on the right of component.

Dependencies

Usage Example

Create timespinner from markup.

  1. <input id="ss" class="easyui-timespinner"  style="width:80px;"  
  2.         required="required" data-options="min:'08:30',showSeconds:true" />  

Create timespinner using javascript.

  1. <input id="ss" style="width:80px;">  
  1. $('#ss').timespinner({  
  2.     min: '08:30',  
  3.     required: true,  
  4.     showSeconds: true  
  5. });  

Properties

The properties extend from spinner, below is the added properties for timespinner.

Name Type Description Default
separator string The separator between hour and minute and second. :
showSeconds boolean Defines if to show the second information. false
highlight number The field to highlight initially, 0 = hours, 1 = minutes, бн 0

Events

The events extend from spinner.

Methods

The methods extend from spinner, below is the overridden methods for timespinner.

Name Parameter Description
options none Return the options object.
setValue value Set the timespinner value.

Code example:

$('#ss').timespinner('setValue', '17:45');  // set timespinner value
var v = $('#ss').timespinner('getValue');  // get timespinner value
alert(v);
getHours none Get the current hour value.
getMinutes none Get the current minute value.
getSeconds none Get the current second value.