Use the option() method to change settings for individual instances.
+
$.datepicker.setDefaults( options )
+
Change the default options for all date pickers.
+
Use the option() method to change options for individual instances.
Code examples:
Set all date pickers to open on focus or a click on an icon.
@@ -47,7 +47,7 @@
-
$.datepicker.formatDate( format, date, settings )
+
$.datepicker.formatDate( format, date, options )
Format a date into a string value with a specified format.
The format can be combinations of the following:
@@ -101,7 +101,7 @@
-
$.datepicker.parseDate( format, value, settings )
+
$.datepicker.parseDate( format, value, options )
Extract a date from a string value with a specified format.
The format can be combinations of the following:
@@ -175,7 +175,7 @@
Localization
-
Datepicker provides support for localizing its content to cater for different languages and date formats. Each localization is contained within its own file with the language code appended to the name, e.g., jquery.ui.datepicker-fr.js for French. The desired localization file should be included after the main datepicker code. Each localization file adds its settings to the set of available localizations and automatically applies them as defaults for all instances. Localization files can be found at https://github.com/jquery/jquery-ui/tree/master/ui/i18n.
+
Datepicker provides support for localizing its content to cater for different languages and date formats. Each localization is contained within its own file with the language code appended to the name, e.g., jquery.ui.datepicker-fr.js for French. The desired localization file should be included after the main datepicker code. Each localization file adds its options to the set of available localizations and automatically applies them as defaults for all instances. Localization files can be found at https://github.com/jquery/jquery-ui/tree/master/ui/i18n.
The $.datepicker.regional attribute holds an array of localizations, indexed by language code, with "" referring to the default (English). Each entry is an object with the following attributes: closeText, prevText, nextText, currentText, monthNames, monthNamesShort, dayNames, dayNamesShort, dayNamesMin, weekHeader, dateFormat, firstDay, isRTL, showMonthAfterYear, and yearSuffix.
You can restore the default localizations with:
$.datepicker.setDefaults( $.datepicker.regional[ "" ] );
@@ -405,7 +405,7 @@
When the datepicker should appear. The datepicker can appear when the field receives focus ("focus"), when a button is clicked ("button"), or when either event occurs ("both").
- easing and duration properties to configure animations.
+ An object containing easing and duration properties to configure animations.
Can also contain a down property with any of the above options.
"Down" animations occur when the panel being activated has a lower index than the currently active panel.