O'Reilly logo

Beginning JavaScript® and CSS Development with jQuery by Richard York

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required