Appendix O. Datepicker

Method

Description

Return Value

Datepicker Methods

  

datepicker(options)

Makes the selected elements into datepickers (see "Datepicker Options").

jQuery

datepicker("option", settings)

Changes settings for a previously attached datepicker.

jQuery

datepicker("dialog", dateText, onSelect, settings)

Opens a datepicker in a dialogue box.

jQuery

datepicker("disable")

Disables a datepicker.

jQuery

datepicker("enable")

Enables a datepicker.

jQuery

datepicker("isDisabled")

Determines whether a datepicker field has been disabled.

Boolean

datepicker("hide", speed)

Closes a previously open datepicker.

jQuery

datepicker("show")

Calls up a previously attached datepicker.

jQuery

datepicker("destroy")

Disconnects the datepicker functionality from its associated control.

jQuery

datepicker("getDate")

Retrieves the current date(s) for a datepicker.

Date or Date[2]

datepicker("setDate", date, endDate)

Sets the current date(s) for a datepicker.

jQuery

Datepicker Options

Option

Description

Type

clearText

The text to display for the clear link. The default is "Clear".

String

clearStatus

The text to display in the status bar for the clear link. The default is "Erase the current date".

String

mandatory

true if a date must be selected, causing the Clear link to be removed. false if the date is not required. The default is false.

Boolean

closeText

The text to display for the close link. The default is "Close".

String

closeStatus

The text to display in the status bar for the close link. The default is "Close without change".

String

closeAtTop ...

Get Beginning JavaScript® and CSS Development with jQuery now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.