jQuery & jQuery UI Documentation

jQuery & jQuery UI

setDefaults

« Back to UI/Datepicker

setDefaults( settings )

Change the default settings for all date pickers.
Use the option method to change settings for individual instances.
Arguments:
settings Options
The new settings for all date pickers. See the datepicker options.


Examples:
Set all date pickers to open on focus or a click on an icon.

$.datepicker.setDefaults({
   showOn: 'both',
   buttonImageOnly: true,
   buttonImage: 'calendar.gif',
   buttonText: 'Calendar' });

Set all date pickers to have French text.

$.datepicker.setDefaults($.datepicker.regional['fr']);