The position of the top/left of the dialog as [x, y] or a MouseEvent that contains the coordinates. If not specified the dialog is centered on the screen.
Returns JQuery
Opens the datepicker in a dialog box.
Parameters
methodName: "dialog"
'dialog'
date: Date
The initial date.
Optional onSelect: function
A callback function when a date is selected. The function receives the date text and date picker instance as parameters.
The position of the top/left of the dialog as [x, y] or a MouseEvent that contains the coordinates. If not specified the dialog is centered on the screen.
Returns JQuery
Opens the datepicker in a dialog box.
Parameters
methodName: "dialog"
'dialog'
date: string
The initial date.
Optional onSelect: function
A callback function when a date is selected. The function receives the date text and date picker instance as parameters.
The position of the top/left of the dialog as [x, y] or a MouseEvent that contains the coordinates. If not specified the dialog is centered on the screen.
Returns JQuery
Opens the datepicker in a dialog box.
Parameters
methodName: "dialog"
'dialog'
date: string
The initial date.
Optional onSelect: function
A callback function when a date is selected. The function receives the date text and date picker instance as parameters.
The position of the top/left of the dialog as [x, y] or a MouseEvent that contains the coordinates. If not specified the dialog is centered on the screen.
Returns JQuery
Returns the current date for the datepicker or null if no date has been selected.
Parameters
methodName: "getDate"
'getDate'
Returns Date
Close a previously opened date picker.
Parameters
methodName: "hide"
'hide'
Returns JQuery
Determine whether a date picker has been disabled.
Parameters
methodName: "isDisabled"
'isDisabled'
Returns boolean
Redraw the date picker, after having made some external modifications.
Parameters
methodName: "refresh"
'refresh'
Returns JQuery
Sets the date for the datepicker. The new date may be a Date object or a string in the current date format (e.g., "01/26/2009"), a number of days from today (e.g., +7) or a string of values and periods ("y" for years, "m" for months, "w" for weeks, "d" for days, e.g., "+1m +7d"), or null to clear the selected date.
Parameters
methodName: "setDate"
'setDate'
date: Date
The new date.
Returns JQuery
Sets the date for the datepicker. The new date may be a Date object or a string in the current date format (e.g., "01/26/2009"), a number of days from today (e.g., +7) or a string of values and periods ("y" for years, "m" for months, "w" for weeks, "d" for days, e.g., "+1m +7d"), or null to clear the selected date.
Parameters
methodName: "setDate"
'setDate'
date: string
The new date.
Returns JQuery
Open the date picker. If the datepicker is attached to an input, the input must be visible for the datepicker to be shown.
Parameters
methodName: "show"
'show'
Returns JQuery
Returns a jQuery object containing the datepicker.
Parameters
methodName: "widget"
'widget'
Returns JQuery
Get the altField option, after initialization
Parameters
methodName: "option"
'option'
optionName: "altField"
'altField'
Returns any
Set the altField option, after initialization
Parameters
methodName: "option"
'option'
optionName: "altField"
'altField'
altFieldValue: string
An input element that is to be updated with the selected date from the datepicker. Use the altFormat option to change the format of the date within this field. Leave as blank for no alternate field.
Returns JQuery
Set the altField option, after initialization
Parameters
methodName: "option"
'option'
optionName: "altField"
'altField'
altFieldValue: JQuery
An input element that is to be updated with the selected date from the datepicker. Use the altFormat option to change the format of the date within this field. Leave as blank for no alternate field.
Returns JQuery
Set the altField option, after initialization
Parameters
methodName: "option"
'option'
optionName: "altField"
'altField'
altFieldValue: Element
An input element that is to be updated with the selected date from the datepicker. Use the altFormat option to change the format of the date within this field. Leave as blank for no alternate field.
Returns JQuery
Get the altFormat option, after initialization
Parameters
methodName: "option"
'option'
optionName: "altFormat"
'altFormat'
Returns string
Set the altFormat option, after initialization
Parameters
methodName: "option"
'option'
optionName: "altFormat"
'altFormat'
altFormatValue: string
The dateFormat to be used for the altField option. This allows one date format to be shown to the user for selection purposes, while a different format is actually sent behind the scenes. For a full list of the possible formats see the formatDate function
Returns JQuery
Get the appendText option, after initialization
Parameters
methodName: "option"
'option'
optionName: "appendText"
'appendText'
Returns string
Set the appendText option, after initialization
Parameters
methodName: "option"
'option'
optionName: "appendText"
'appendText'
appendTextValue: string
The text to display after each date field, e.g., to show the required format.
Returns JQuery
Get the autoSize option, after initialization
Parameters
methodName: "option"
'option'
optionName: "autoSize"
'autoSize'
Returns boolean
Set the autoSize option, after initialization
Parameters
methodName: "option"
'option'
optionName: "autoSize"
'autoSize'
autoSizeValue: boolean
Set to true to automatically resize the input field to accommodate dates in the current dateFormat.
A function that takes an input field and current datepicker instance and returns an options object to update the datepicker with. It is called just before the datepicker is displayed.
A function that takes a date as a parameter and must return an array with:
[0]: true/false indicating whether or not this date is selectable
[1]: a CSS class name to add to the date's cell or "" for the default presentation
[2]: an optional popup tooltip for this date
The function is called for each day in the datepicker before it is displayed.
(date: Date): any[]
Parameters
date: Date
Returns any[]
Returns JQuery
Get the buttonImage option, after initialization
Parameters
methodName: "option"
'option'
optionName: "buttonImage"
'buttonImage'
Returns string
Set the buttonImage option, after initialization
Parameters
methodName: "option"
'option'
optionName: "buttonImage"
'buttonImage'
buttonImageValue: string
A URL of an image to use to display the datepicker when the showOn option is set to "button" or "both". If set, the buttonText option becomes the alt value and is not directly displayed.
Returns JQuery
Get the buttonImageOnly option, after initialization
Parameters
methodName: "option"
'option'
optionName: "buttonImageOnly"
'buttonImageOnly'
Returns boolean
Set the buttonImageOnly option, after initialization
Parameters
methodName: "option"
'option'
optionName: "buttonImageOnly"
'buttonImageOnly'
buttonImageOnlyValue: boolean
Whether the button image should be rendered by itself instead of inside a button element. This option is only relevant if the buttonImage option has also been set.
Returns JQuery
Get the buttonText option, after initialization
Parameters
methodName: "option"
'option'
optionName: "buttonText"
'buttonText'
Returns string
Get the autohide option, after initialization
Parameters
methodName: "option"
'option'
optionName: "autohide"
'autohide'
Returns boolean
Get the endDate after initialization
Parameters
methodName: "option"
'option'
optionName: "endDate"
'endDate'
Returns Date
Set the buttonText option, after initialization
Parameters
methodName: "option"
'option'
optionName: "buttonText"
'buttonText'
buttonTextValue: string
The text to display on the trigger button. Use in conjunction with the showOn option set to "button" or "both".
Returns JQuery
Get the calculateWeek option, after initialization
Parameters
methodName: "option"
'option'
optionName: "calculateWeek"
'calculateWeek'
Returns function
(date: Date): string
Parameters
date: Date
Returns string
Set the calculateWeek option, after initialization
Parameters
methodName: "option"
'option'
optionName: "calculateWeek"
'calculateWeek'
calculateWeekValue: function
A function to calculate the week of the year for a given date. The default implementation uses the ISO 8601 definition: weeks start on a Monday; the first week of the year contains the first Thursday of the year.
(date: Date): string
Parameters
date: Date
Returns string
Returns JQuery
Get the changeMonth option, after initialization
Parameters
methodName: "option"
'option'
optionName: "changeMonth"
'changeMonth'
Returns boolean
Set the changeMonth option, after initialization
Parameters
methodName: "option"
'option'
optionName: "changeMonth"
'changeMonth'
changeMonthValue: boolean
Whether the month should be rendered as a dropdown instead of text.
Returns JQuery
Get the changeYear option, after initialization
Parameters
methodName: "option"
'option'
optionName: "changeYear"
'changeYear'
Returns boolean
Set the changeYear option, after initialization
Parameters
methodName: "option"
'option'
optionName: "changeYear"
'changeYear'
changeYearValue: boolean
Whether the year should be rendered as a dropdown instead of text. Use the yearRange option to control which years are made available for selection.
Returns JQuery
Get the closeText option, after initialization
Parameters
methodName: "option"
'option'
optionName: "closeText"
'closeText'
Returns string
Set the closeText option, after initialization
Parameters
methodName: "option"
'option'
optionName: "closeText"
'closeText'
closeTextValue: string
The text to display for the close link. Use the showButtonPanel option to display this button.
Returns JQuery
Get the constrainInput option, after initialization
Parameters
methodName: "option"
'option'
optionName: "constrainInput"
'constrainInput'
Returns boolean
Set the constrainInput option, after initialization
Parameters
methodName: "option"
'option'
optionName: "constrainInput"
'constrainInput'
constrainInputValue: boolean
When true, entry in the input field is constrained to those characters allowed by the current dateFormat option.
Returns JQuery
Get the currentText option, after initialization
Parameters
methodName: "option"
'option'
optionName: "currentText"
'currentText'
Returns string
Set the currentText option, after initialization
Parameters
methodName: "option"
'option'
optionName: "currentText"
'currentText'
currentTextValue: string
The text to display for the current day link. Use the showButtonPanel option to display this button.
Returns JQuery
Get the dateFormat option, after initialization
Parameters
methodName: "option"
'option'
optionName: "dateFormat"
'dateFormat'
Returns string
Set the dateFormat option, after initialization
Parameters
methodName: "option"
'option'
optionName: "dateFormat"
'dateFormat'
dateFormatValue: string
The format for parsed and displayed dates. For a full list of the possible formats see the formatDate function.
Returns JQuery
Get the dayNames option, after initialization
Parameters
methodName: "option"
'option'
optionName: "dayNames"
'dayNames'
Returns string[]
Set the dayNames option, after initialization
Parameters
methodName: "option"
'option'
optionName: "dayNames"
'dayNames'
dayNamesValue: string[]
The list of long day names, starting from Sunday, for use as requested via the dateFormat option.
Returns JQuery
Get the dayNamesMin option, after initialization
Parameters
methodName: "option"
'option'
optionName: "dayNamesMin"
'dayNamesMin'
Returns string[]
Set the dayNamesMin option, after initialization
Parameters
methodName: "option"
'option'
optionName: "dayNamesMin"
'dayNamesMin'
dayNamesMinValue: string[]
The list of minimised day names, starting from Sunday, for use as column headers within the datepicker.
Returns JQuery
Get the dayNamesShort option, after initialization
Parameters
methodName: "option"
'option'
optionName: "dayNamesShort"
'dayNamesShort'
Returns string[]
Set the dayNamesShort option, after initialization
Parameters
methodName: "option"
'option'
optionName: "dayNamesShort"
'dayNamesShort'
dayNamesShortValue: string[]
The list of abbreviated day names, starting from Sunday, for use as requested via the dateFormat option.
Returns JQuery
Get the defaultDate option, after initialization
Parameters
methodName: "option"
'option'
optionName: "defaultDate"
'defaultDate'
Returns any
Set the defaultDate option, after initialization
Parameters
methodName: "option"
'option'
optionName: "defaultDate"
'defaultDate'
defaultDateValue: Date
A date object containing the default date.
Returns JQuery
Set the defaultDate option, after initialization
Parameters
methodName: "option"
'option'
optionName: "defaultDate"
'defaultDate'
defaultDateValue: number
A number of days from today. For example 2 represents two days from today and -1 represents yesterday.
Returns JQuery
Set the defaultDate option, after initialization
Parameters
methodName: "option"
'option'
optionName: "defaultDate"
'defaultDate'
defaultDateValue: string
A string in the format defined by the dateFormat option, or a relative date. Relative dates must contain value and period pairs; valid periods are "y" for years, "m" for months, "w" for weeks, and "d" for days. For example, "+1m +7d" represents one month and seven days from today.
Returns JQuery
Get the duration option, after initialization
Parameters
methodName: "option"
'option'
optionName: "duration"
'duration'
Returns string
Set the duration option, after initialization
Parameters
methodName: "option"
'option'
optionName: "duration"
'duration'
durationValue: string
Control the speed at which the datepicker appears, it may be a time in milliseconds or a string representing one of the three predefined speeds ("slow", "normal", "fast").
Returns JQuery
Get the firstDay option, after initialization
Parameters
methodName: "option"
'option'
optionName: "firstDay"
'firstDay'
Returns number
Set the firstDay option, after initialization
Parameters
methodName: "option"
'option'
optionName: "firstDay"
'firstDay'
firstDayValue: number
Set the first day of the week: Sunday is 0, Monday is 1, etc.
Returns JQuery
Get the gotoCurrent option, after initialization
Parameters
methodName: "option"
'option'
optionName: "gotoCurrent"
'gotoCurrent'
Returns boolean
Set the gotoCurrent option, after initialization
Parameters
methodName: "option"
'option'
optionName: "gotoCurrent"
'gotoCurrent'
gotoCurrentValue: boolean
When true, the current day link moves to the currently selected date instead of today.
Returns JQuery
Gets the value currently associated with the specified optionName.
Initialize a datepicker