jQuery EasyUI Form Plugin - Datetimebox DateTime Picker
Extends from $.fn.datebox.defaults. Overrides the default defaults with $.fn.datetimebox.defaults.
Similar to the datebox, the datetimebox allows users to select a date and time to be displayed with a specified format. It adds a time spinner (timespinner) component to the dropdown panel.
Dependencies
- datebox
- timespinner
Usage
Create a datetimebox from markup.
<input class="easyui-datetimebox" name="birthday"
data-options="required:true,showSeconds:false" value="3/4/2010 2:3" style="width:150px">
Create a datetimebox using javascript.
<input id="dt" type="text" name="birthday">
$('#dt').datetimebox({
value: '3/4/2010 2:3',
required: true,
showSeconds: false
});
Properties
This property extends from datebox, and the following properties are added for datetimebox.
Name | Type | Description | Default Value |
---|---|---|---|
showSeconds | boolean | Defines whether to show seconds information. | true |
timeSeparator | string | The time separator between hours, minutes, and seconds. This property is available since version 1.3. | : |
Methods
This method extends from datebox, and the following methods are overridden for datetimebox.
Name | Parameters | Description |
---|---|---|
options | none | Returns the options object. |
spinner | none | Returns the time spinner (timespinner) object. |
setValue | value | Sets the value of the datetimebox. <br>Example: $('#dt').datetimebox('setValue', '6/1/2012 12:30:56'); // set datetimebox value<br>var v = $('#dt').datetimebox('getValue'); // get datetimebox value<br>alert(v); |