Appendix O

Datepicker

Datepicker Methods
Method Description Return Value
datepicker(options) Makes the selected elements into Datepickers (see “Datepicker Options”). jQuery
datepicker('destroy') Destroys the Datepicker. jQuery
datepicker('dialog', date[, onSelect][, settings][, pos]) Opens a Datepicker in a dialog box. jQuery
datepicker('getDate') Retrieves the current date(s) for a Datepicker. Date
datepicker('hide', speed) Closes a previously open Datepicker. jQuery
datepicker('isDisabled') Determines whether a Datepicker field has been disabled. Boolean
datepicker('option') Returns an object of all options as key, value pairs. Object
datepicker('option', optionName) Returns the specified option. Mixed
datepicker('option', optionName, value) Sets the specified option to the specified value. jQuery
datepicker('option', optionObject) Sets options using an option object. jQuery
datepicker('setDate', date, endDate) Sets the current date(s) for a Datepicker. jQuery
datepicker('show') Opens a Datepicker. jQuery
datepicker('widget') Returns a jQuery object containing the Datepicker. jQuery
Datepicker Options
Option Description Type
altField The jQuery selector for another field that is to be updated with the selected date from the Datepicker. Use the altFormat setting below to change the format of the date within this field. Leave as blank for no alternative field.Default value: " String
altFormat The dateFormat to be used for the altField ...

Get Web Development with jQuery now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.