Web Development with jQuery®

(Elliott) #1

(^590) ❘ APPENDIX O DATEPICKER
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 fi eld 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 fi eld. Leave as blank
for no alternative fi eld.
Default value: ''
String
altFormat The dateFormat to be used for the altField
above. This allows one date format to be shown to
the user for selection purposes, whereas a different
format is actually sent behind the scenes.
Default value: ''
String
appendText The text to display after each date fi eld, for
example, to show the required format.
Default value: ''
String
autoSize Set to true to automatically resize the input fi eld to
accommodate dates in the current dateFormat.
Default value: false
Boolean
beforeShow Can be a function that takes an input fi eld and
current Datepicker instance and returns a settings
(anonymous) object to update the Datepicker with.
It is called just before the Datepicker is displayed.
Default value: null
function
(input,
obj)
beforeShowDay The function takes a date as a parameter and must
return an array, with [0] equal to true/false
indicating whether this date is selectable, [1] equal
to a CSS class name(s) or '' for the default
presentation. It is called for each day in the
Datepicker before it is displayed.
Default value: null
function
(date)
(continued)
http://www.it-ebooks.info

Free download pdf