Extend from $.fn.datebox.defaults, Override defaults with $.fn.datetimebox.defaults.
Similar to the datebox, the datetimebox allows the user to select a date and a time to display the date and time with specified format. It adds a timespinner component to the drop-down panel.
Create datetimebox from markup.
Create datetimebox using javascript.
The properties extend from datebox, below is the added properties for datetimebox:
Name | Type | Description | Default |
---|---|---|---|
showSeconds | boolean | Defines if to display the second information. | true |
timeSeparator | string | The time separator between hour and minute and second. This property is available since version 1.3. | : |
The methods extend from datebox, below is the overridden methods for datetimebox.
Name | Parameter | Description |
---|---|---|
options | none | Return the options object. |
spinner | none | Return the timespinner object. |
setValue | value |
Set the datetimebox value.
Code example: $('#dt').datetimebox('setValue', '6/1/2012 12:30:56'); // set datetimebox value var v = $('#dt').datetimebox('getValue'); // get datetimebox value alert(v); |