Easy Tutorial
❮ Jeasyui Datagrid Datagrid13 Jeasyui Datagrid Datagrid22 ❯

jQuery EasyUI Form Plugin - Timespinner



Extends from $.fn.spinner.defaults. Overrides the default defaults with $.fn.timespinner.defaults.

The timespinner is created based on the spinner. It is similar to the numberspinner, but it only displays time values. The timespinner allows users to increment or decrement time by clicking the small spinner buttons on the right side of the component.

Dependencies

Usage

Create a timespinner from markup.

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

Create a timespinner using JavaScript.

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

Properties

This property extends from spinner. The following properties are added for timespinner.

Name Type Description Default
separator string The separator between hours, minutes, and seconds. :
showSeconds boolean Defines whether to show seconds. false
highlight number The initially highlighted field, 0 = hours, 1 = minutes, ... 0

Events

This event extends from spinner.

Methods

This method extends from spinner. The following methods are overridden for timespinner.

Name Parameters Description
options none Returns the options object.
setValue value Sets the value of the timespinner. <br>Example: $('#ss').timespinner('setValue', '17:45'); // set timespinner value<br>var v = $('#ss').timespinner('getValue'); // get timespinner value<br>alert(v);
getHours none Gets the current hour value.
getMinutes none Gets the current minute value.
getSeconds none Gets the current second value.
❮ Jeasyui Datagrid Datagrid13 Jeasyui Datagrid Datagrid22 ❯