Listing the datepicker methods
Along with the wide range of configuration options at our disposal, there are also a number of useful methods defined that make working with the datepicker a breeze.
In addition to the shared API methods discussed in Chapter 1, Introducing jQuery UI, such as destroy
, disable
, enable
, option
, and widget
. The datepicker API also exposes the following unique methods:
Method |
Used to… |
---|---|
|
Open the datepicker in a dialog widget. |
|
Get the currently selected date. |
|
Programmatically close a datepicker. |
|
Determine whether a datepicker is disabled. |
|
Redraw the datepicker. |
|
Programmatically select a date. |
|
Programmatically show a datepicker. |
Let's take a look at some of these methods in more detail, beginning with selecting dates programmatically.
Selecting a date programmatically
There may be times (such as on dynamic, client-server sites), when we want to be able to set a particular date from...