2 <ul class=
"UIAPIPlugin-toc">
3 <li><a href=
"#overview">Overview
</a></li>
4 <li><a href=
"#options">Options
</a></li>
5 <li><a href=
"#events">Events
</a></li>
6 <li><a href=
"#methods">Methods
</a></li>
7 <li><a href=
"#theming">Theming
</a></li>
9 <div class=
"UIAPIPlugin">
10 <h1>jQuery UI Datepicker
</h1>
12 <h2 class=
"top-header">Overview
</h2>
13 <div id=
"overview-main">
14 <p>The jQuery UI Datepicker is a highly configurable plugin that adds datepicker functionality to your pages. You can customize the date format and language, restrict the selectable date ranges and add in buttons and other navigation options easily.
</p>
15 <p>By default, the datepicker calendar opens in a small overlay onFocus and closes automatically onBlur or when a date is selected. For an inline calendar, simply attach the datepicker to a div or span.
16 </p><p>You can use keyboard shortcuts to drive the datepicker:
19 <li>page up/down - previous/next month
</li>
20 <li>ctrl+page up/down - previous/next year
</li>
21 <li>ctrl+home - current month or open when closed
</li>
22 <li>ctrl+left/right - previous/next day
</li>
23 <li>ctrl+up/down - previous/next week
</li>
24 <li>enter - accept the selected date
</li>
25 <li>ctrl+end - close and erase the date
</li>
26 <li>escape - close the datepicker without selection
</li>
28 <div class=
"editsection" style=
"float:right;margin-left:5px;">[
<a href=
"http://docs.jquery.com/action/edit/UI/API/1.8/Datepicker?section=1" title=
"Edit section: Utility functions">edit
</a>]
</div><a name=
"Utility_functions"></a><h3 id=
"utility-functions">Utility functions
</h3>
30 <li><a href=
"http://docs.jquery.com/UI/Datepicker/setDefaults" title=
"UI/Datepicker/setDefaults">$.datepicker.setDefaults( settings )
</a> - Set settings for all datepicker instances.
</li>
31 <li><a href=
"http://docs.jquery.com/UI/Datepicker/formatDate" title=
"UI/Datepicker/formatDate">$.datepicker.formatDate( format, date, settings )
</a> - Format a date into a string value with a specified format.
</li>
32 <li><a href=
"http://docs.jquery.com/UI/Datepicker/parseDate" title=
"UI/Datepicker/parseDate">$.datepicker.parseDate( format, value, settings )
</a> - Extract a date from a string value with a specified format.
</li>
33 <li><a href=
"http://docs.jquery.com/UI/Datepicker/iso8601Week" title=
"UI/Datepicker/iso8601Week">$.datepicker.iso8601Week( date )
</a> - Determine the week of the year for a given date:
1 to
53.
</li>
34 <li><a href=
"http://docs.jquery.com/UI/Datepicker/noWeekends" title=
"UI/Datepicker/noWeekends">$.datepicker.noWeekends
</a> - Set as beforeShowDay function to prevent selection of weekends.
</li>
36 <div class=
"editsection" style=
"float:right;margin-left:5px;">[
<a href=
"http://docs.jquery.com/action/edit/UI/API/1.8/Datepicker?section=2" title=
"Edit section: Localization">edit
</a>]
</div><a name=
"Localization"></a><h3>Localization
</h3>
37 <p>Datepicker provides support for localizing its content to cater for different languages
38 and date formats. Each localization is contained within its own file with the
39 language code appended to the name, e.g.
<code>jquery.ui.datepicker-fr.js
</code> for French.
40 The desired localization file should be include after the main datepicker code. They add their settings to the set
41 of available localizations and automatically apply them as defaults for all instances.
</p>
42 <p>The
<code>$.datepicker.regional
</code> attribute holds an array of localizations,
43 indexed by language code, with '' referring to the default (English). Each entry is
44 an object with the following attributes:
<code>closeText
</code>,
<code>prevText
</code>,
45 <code>nextText
</code>,
<code>currentText
</code>,
<code>monthNames
</code>,
46 <code>monthNamesShort
</code>,
<code>dayNames
</code>,
<code>dayNamesShort
</code>,
47 <code>dayNamesMin
</code>,
<code>weekHeader
</code>,
<code>dateFormat
</code>,
48 <code>firstDay
</code>,
<code>isRTL
</code>,
<code>showMonthAfterYear
</code>,
49 and
<code>yearSuffix
</code>.
</p>
50 <p>You can restore the default localizations with:
</p>
51 <p><code>$.datepicker.setDefaults($.datepicker.regional['']);
</code>
53 <p>And can then override an individual datepicker for a specific locale:
</p>
54 <p><code>$(selector).datepicker($.datepicker.regional['fr']);
</code>
56 The localization files are also available in the UI svn:
<a href=
"http://jquery-ui.googlecode.com/svn/trunk/ui/i18n/" class=
"external free" title=
"http://jquery-ui.googlecode.com/svn/trunk/ui/i18n/">http://jquery-ui.googlecode.com/svn/trunk/ui/i18n/
</a>
58 <div id=
"overview-dependencies">
64 <div id=
"overview-example">
66 <div id=
"overview-example" class=
"example">
67 <ul><li><a href=
"#demo"><span>Demo
</span></a></li><li><a href=
"#source"><span>View Source
</span></a></li></ul>
68 <p><div id=
"demo" class=
"tabs-container" rel=
"220">
69 A simple jQuery UI Datepicker.
<br />
71 <pre>$(
"#datepicker
").datepicker();
73 <p></div><div id=
"source" class=
"tabs-container">
75 <pre><!DOCTYPE html
>
78 <link href=
"http://ajax.googleapis.com/ajax/libs/jqueryui/
1.8/themes/base/jquery-ui.css
" rel=
"stylesheet
" type=
"text/css
"/
>
79 <script src=
"http://ajax.googleapis.com/ajax/libs/jquery/
1.4/jquery.min.js
"></script
>
80 <script src=
"http://ajax.googleapis.com/ajax/libs/jqueryui/
1.8/jquery-ui.min.js
"></script
>
83 $(document).ready(function() {
84 $(
"#datepicker
").datepicker();
88 <body
style=
"font-size:62.5%;">
90 <div type=
"text
" id=
"datepicker
"></div
>
100 <h2 class=
"top-header">Options
</h2>
101 <ul class=
"options-list">
103 <li class=
"option" id=
"option-disabled">
104 <div class=
"option-header">
105 <h3 class=
"option-name"><a href=
"#option-disabled">disabled
</a></h3>
107 <dt class=
"option-type-label">Type:
</dt>
108 <dd class=
"option-type">Boolean
</dd>
110 <dt class=
"option-default-label">Default:
</dt>
111 <dd class=
"option-default">false
</dd>
115 <div class=
"option-description">
116 <p>Disables (true) or enables (false) the datepicker. Can be set when initialising (first creating) the datepicker.
</p>
118 <div class=
"option-examples">
119 <h4>Code examples
</h4>
120 <dl class=
"option-examples-list">
123 Initialize a datepicker with the
<code>disabled
</code> option specified.
126 <pre><code>$(
".selector" ).datepicker({ disabled: true });
</code></pre>
131 Get or set the
<code>disabled
</code> option, after init.
135 var disabled = $(
".selector" ).datepicker(
"option",
"disabled" );
137 $(
".selector" ).datepicker(
"option",
"disabled", true );
</code></pre>
145 <li class=
"option" id=
"option-altField">
146 <div class=
"option-header">
147 <h3 class=
"option-name"><a href=
"#option-altField">altField
</a></h3>
149 <dt class=
"option-type-label">Type:
</dt>
150 <dd class=
"option-type">String
</dd>
152 <dt class=
"option-default-label">Default:
</dt>
153 <dd class=
"option-default">''
</dd>
157 <div class=
"option-description">
158 <p>The jQuery selector for another field that is to be updated with the selected date from the datepicker. Use the
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-altFormat" title=
"UI/Datepicker">altFormat
</a></code> setting to change the format of the date within this field. Leave as blank for no alternate field.
</p>
160 <div class=
"option-examples">
161 <h4>Code examples
</h4>
162 <dl class=
"option-examples-list">
165 Initialize a datepicker with the
<code>altField
</code> option specified.
168 <pre><code>$(
".selector" ).datepicker({ altField: '#actualDate' });
</code></pre>
173 Get or set the
<code>altField
</code> option, after init.
177 var altField = $(
".selector" ).datepicker(
"option",
"altField" );
179 $(
".selector" ).datepicker(
"option",
"altField", '#actualDate' );
</code></pre>
187 <li class=
"option" id=
"option-altFormat">
188 <div class=
"option-header">
189 <h3 class=
"option-name"><a href=
"#option-altFormat">altFormat
</a></h3>
191 <dt class=
"option-type-label">Type:
</dt>
192 <dd class=
"option-type">String
</dd>
194 <dt class=
"option-default-label">Default:
</dt>
195 <dd class=
"option-default">''
</dd>
199 <div class=
"option-description">
200 <p>The
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-dateFormat" title=
"UI/Datepicker">dateFormat
</a></code> to be used for the
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-altField" title=
"UI/Datepicker">altField
</a></code> 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
<a href=
"http://docs.jquery.com/UI/Datepicker/formatDate" title=
"UI/Datepicker/formatDate">formatDate
</a> function
</p>
202 <div class=
"option-examples">
203 <h4>Code examples
</h4>
204 <dl class=
"option-examples-list">
207 Initialize a datepicker with the
<code>altFormat
</code> option specified.
210 <pre><code>$(
".selector" ).datepicker({ altFormat: 'yy-mm-dd' });
</code></pre>
215 Get or set the
<code>altFormat
</code> option, after init.
219 var altFormat = $(
".selector" ).datepicker(
"option",
"altFormat" );
221 $(
".selector" ).datepicker(
"option",
"altFormat", 'yy-mm-dd' );
</code></pre>
229 <li class=
"option" id=
"option-appendText">
230 <div class=
"option-header">
231 <h3 class=
"option-name"><a href=
"#option-appendText">appendText
</a></h3>
233 <dt class=
"option-type-label">Type:
</dt>
234 <dd class=
"option-type">String
</dd>
236 <dt class=
"option-default-label">Default:
</dt>
237 <dd class=
"option-default">''
</dd>
241 <div class=
"option-description">
242 <p>The text to display after each date field, e.g. to show the required format.
</p>
244 <div class=
"option-examples">
245 <h4>Code examples
</h4>
246 <dl class=
"option-examples-list">
249 Initialize a datepicker with the
<code>appendText
</code> option specified.
252 <pre><code>$(
".selector" ).datepicker({ appendText: '(yyyy-mm-dd)' });
</code></pre>
257 Get or set the
<code>appendText
</code> option, after init.
261 var appendText = $(
".selector" ).datepicker(
"option",
"appendText" );
263 $(
".selector" ).datepicker(
"option",
"appendText", '(yyyy-mm-dd)' );
</code></pre>
271 <li class=
"option" id=
"option-autoSize">
272 <div class=
"option-header">
273 <h3 class=
"option-name"><a href=
"#option-autoSize">autoSize
</a></h3>
275 <dt class=
"option-type-label">Type:
</dt>
276 <dd class=
"option-type">Boolean
</dd>
278 <dt class=
"option-default-label">Default:
</dt>
279 <dd class=
"option-default">false
</dd>
283 <div class=
"option-description">
284 <p>Set to true to automatically resize the input field to accomodate dates in the current
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-dateFormat" title=
"UI/Datepicker">dateFormat
</a></code>.
</p>
286 <div class=
"option-examples">
287 <h4>Code examples
</h4>
288 <dl class=
"option-examples-list">
291 Initialize a datepicker with the
<code>autoSize
</code> option specified.
294 <pre><code>$(
".selector" ).datepicker({ autoSize: true });
</code></pre>
299 Get or set the
<code>autoSize
</code> option, after init.
303 var autoSize = $(
".selector" ).datepicker(
"option",
"autoSize" );
305 $(
".selector" ).datepicker(
"option",
"autoSize", true );
</code></pre>
313 <li class=
"option" id=
"option-buttonImage">
314 <div class=
"option-header">
315 <h3 class=
"option-name"><a href=
"#option-buttonImage">buttonImage
</a></h3>
317 <dt class=
"option-type-label">Type:
</dt>
318 <dd class=
"option-type">String
</dd>
320 <dt class=
"option-default-label">Default:
</dt>
321 <dd class=
"option-default">''
</dd>
325 <div class=
"option-description">
326 <p>The URL for the popup button image. If set,
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-buttonText" title=
"UI/Datepicker">buttonText
</a></code> becomes the
<i>alt
</i> value and is not directly displayed.
</p>
328 <div class=
"option-examples">
329 <h4>Code examples
</h4>
330 <dl class=
"option-examples-list">
333 Initialize a datepicker with the
<code>buttonImage
</code> option specified.
336 <pre><code>$(
".selector" ).datepicker({ buttonImage: '/images/datepicker.gif' });
</code></pre>
341 Get or set the
<code>buttonImage
</code> option, after init.
345 var buttonImage = $(
".selector" ).datepicker(
"option",
"buttonImage" );
347 $(
".selector" ).datepicker(
"option",
"buttonImage", '/images/datepicker.gif' );
</code></pre>
355 <li class=
"option" id=
"option-buttonImageOnly">
356 <div class=
"option-header">
357 <h3 class=
"option-name"><a href=
"#option-buttonImageOnly">buttonImageOnly
</a></h3>
359 <dt class=
"option-type-label">Type:
</dt>
360 <dd class=
"option-type">Boolean
</dd>
362 <dt class=
"option-default-label">Default:
</dt>
363 <dd class=
"option-default">false
</dd>
367 <div class=
"option-description">
368 <p>Set to true to place an image after the field to use as the trigger without it appearing on a button.
</p>
370 <div class=
"option-examples">
371 <h4>Code examples
</h4>
372 <dl class=
"option-examples-list">
375 Initialize a datepicker with the
<code>buttonImageOnly
</code> option specified.
378 <pre><code>$(
".selector" ).datepicker({ buttonImageOnly: true });
</code></pre>
383 Get or set the
<code>buttonImageOnly
</code> option, after init.
387 var buttonImageOnly = $(
".selector" ).datepicker(
"option",
"buttonImageOnly" );
389 $(
".selector" ).datepicker(
"option",
"buttonImageOnly", true );
</code></pre>
397 <li class=
"option" id=
"option-buttonText">
398 <div class=
"option-header">
399 <h3 class=
"option-name"><a href=
"#option-buttonText">buttonText
</a></h3>
401 <dt class=
"option-type-label">Type:
</dt>
402 <dd class=
"option-type">String
</dd>
404 <dt class=
"option-default-label">Default:
</dt>
405 <dd class=
"option-default">'...'
</dd>
409 <div class=
"option-description">
410 <p>The text to display on the trigger button. Use in conjunction with
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-showOn" title=
"UI/Datepicker">showOn
</a></code> equal to 'button' or 'both'.
</p>
412 <div class=
"option-examples">
413 <h4>Code examples
</h4>
414 <dl class=
"option-examples-list">
417 Initialize a datepicker with the
<code>buttonText
</code> option specified.
420 <pre><code>$(
".selector" ).datepicker({ buttonText: 'Choose' });
</code></pre>
425 Get or set the
<code>buttonText
</code> option, after init.
429 var buttonText = $(
".selector" ).datepicker(
"option",
"buttonText" );
431 $(
".selector" ).datepicker(
"option",
"buttonText", 'Choose' );
</code></pre>
439 <li class=
"option" id=
"option-calculateWeek">
440 <div class=
"option-header">
441 <h3 class=
"option-name"><a href=
"#option-calculateWeek">calculateWeek
</a></h3>
443 <dt class=
"option-type-label">Type:
</dt>
444 <dd class=
"option-type">Function
</dd>
446 <dt class=
"option-default-label">Default:
</dt>
447 <dd class=
"option-default">$.datepicker.iso8601Week
</dd>
451 <div class=
"option-description">
452 <p>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.
</p>
454 <div class=
"option-examples">
455 <h4>Code examples
</h4>
456 <dl class=
"option-examples-list">
459 Initialize a datepicker with the
<code>calculateWeek
</code> option specified.
462 <pre><code>$(
".selector" ).datepicker({ calculateWeek: myWeekCalc });
</code></pre>
467 Get or set the
<code>calculateWeek
</code> option, after init.
471 var calculateWeek = $(
".selector" ).datepicker(
"option",
"calculateWeek" );
473 $(
".selector" ).datepicker(
"option",
"calculateWeek", myWeekCalc );
</code></pre>
481 <li class=
"option" id=
"option-changeMonth">
482 <div class=
"option-header">
483 <h3 class=
"option-name"><a href=
"#option-changeMonth">changeMonth
</a></h3>
485 <dt class=
"option-type-label">Type:
</dt>
486 <dd class=
"option-type">Boolean
</dd>
488 <dt class=
"option-default-label">Default:
</dt>
489 <dd class=
"option-default">false
</dd>
493 <div class=
"option-description">
494 <p>Allows you to change the month by selecting from a drop-down list. You can enable this feature by setting the attribute to true.
</p>
496 <div class=
"option-examples">
497 <h4>Code examples
</h4>
498 <dl class=
"option-examples-list">
501 Initialize a datepicker with the
<code>changeMonth
</code> option specified.
504 <pre><code>$(
".selector" ).datepicker({ changeMonth: true });
</code></pre>
509 Get or set the
<code>changeMonth
</code> option, after init.
513 var changeMonth = $(
".selector" ).datepicker(
"option",
"changeMonth" );
515 $(
".selector" ).datepicker(
"option",
"changeMonth", true );
</code></pre>
523 <li class=
"option" id=
"option-changeYear">
524 <div class=
"option-header">
525 <h3 class=
"option-name"><a href=
"#option-changeYear">changeYear
</a></h3>
527 <dt class=
"option-type-label">Type:
</dt>
528 <dd class=
"option-type">Boolean
</dd>
530 <dt class=
"option-default-label">Default:
</dt>
531 <dd class=
"option-default">false
</dd>
535 <div class=
"option-description">
536 <p>Allows you to change the year by selecting from a drop-down list. You can enable this feature by setting the attribute to true. Use the
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-yearRange" title=
"UI/Datepicker">yearRange
</a></code> option to control which years are made available for selection.
</p>
538 <div class=
"option-examples">
539 <h4>Code examples
</h4>
540 <dl class=
"option-examples-list">
543 Initialize a datepicker with the
<code>changeYear
</code> option specified.
546 <pre><code>$(
".selector" ).datepicker({ changeYear: true });
</code></pre>
551 Get or set the
<code>changeYear
</code> option, after init.
555 var changeYear = $(
".selector" ).datepicker(
"option",
"changeYear" );
557 $(
".selector" ).datepicker(
"option",
"changeYear", true );
</code></pre>
565 <li class=
"option" id=
"option-closeText">
566 <div class=
"option-header">
567 <h3 class=
"option-name"><a href=
"#option-closeText">closeText
</a></h3>
569 <dt class=
"option-type-label">Type:
</dt>
570 <dd class=
"option-type">String
</dd>
572 <dt class=
"option-default-label">Default:
</dt>
573 <dd class=
"option-default">'Done'
</dd>
577 <div class=
"option-description">
578 <p>The text to display for the close link. This attribute is one of the regionalisation attributes. Use the
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-showButtonPanel" title=
"UI/Datepicker">showButtonPanel
</a></code> to display this button.
</p>
580 <div class=
"option-examples">
581 <h4>Code examples
</h4>
582 <dl class=
"option-examples-list">
585 Initialize a datepicker with the
<code>closeText
</code> option specified.
588 <pre><code>$(
".selector" ).datepicker({ closeText: 'X' });
</code></pre>
593 Get or set the
<code>closeText
</code> option, after init.
597 var closeText = $(
".selector" ).datepicker(
"option",
"closeText" );
599 $(
".selector" ).datepicker(
"option",
"closeText", 'X' );
</code></pre>
607 <li class=
"option" id=
"option-constrainInput">
608 <div class=
"option-header">
609 <h3 class=
"option-name"><a href=
"#option-constrainInput">constrainInput
</a></h3>
611 <dt class=
"option-type-label">Type:
</dt>
612 <dd class=
"option-type">Boolean
</dd>
614 <dt class=
"option-default-label">Default:
</dt>
615 <dd class=
"option-default">true
</dd>
619 <div class=
"option-description">
620 <p>When true entry in the input field is constrained to those characters allowed by the current
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-dateFormat" title=
"UI/Datepicker">dateFormat
</a></code>.
</p>
622 <div class=
"option-examples">
623 <h4>Code examples
</h4>
624 <dl class=
"option-examples-list">
627 Initialize a datepicker with the
<code>constrainInput
</code> option specified.
630 <pre><code>$(
".selector" ).datepicker({ constrainInput: false });
</code></pre>
635 Get or set the
<code>constrainInput
</code> option, after init.
639 var constrainInput = $(
".selector" ).datepicker(
"option",
"constrainInput" );
641 $(
".selector" ).datepicker(
"option",
"constrainInput", false );
</code></pre>
649 <li class=
"option" id=
"option-currentText">
650 <div class=
"option-header">
651 <h3 class=
"option-name"><a href=
"#option-currentText">currentText
</a></h3>
653 <dt class=
"option-type-label">Type:
</dt>
654 <dd class=
"option-type">String
</dd>
656 <dt class=
"option-default-label">Default:
</dt>
657 <dd class=
"option-default">'Today'
</dd>
661 <div class=
"option-description">
662 <p>The text to display for the current day link. This attribute is one of the regionalisation attributes. Use the
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-showButtonPanel" title=
"UI/Datepicker">showButtonPanel
</a></code> to display this button.
</p>
664 <div class=
"option-examples">
665 <h4>Code examples
</h4>
666 <dl class=
"option-examples-list">
669 Initialize a datepicker with the
<code>currentText
</code> option specified.
672 <pre><code>$(
".selector" ).datepicker({ currentText: 'Now' });
</code></pre>
677 Get or set the
<code>currentText
</code> option, after init.
681 var currentText = $(
".selector" ).datepicker(
"option",
"currentText" );
683 $(
".selector" ).datepicker(
"option",
"currentText", 'Now' );
</code></pre>
691 <li class=
"option" id=
"option-dateFormat">
692 <div class=
"option-header">
693 <h3 class=
"option-name"><a href=
"#option-dateFormat">dateFormat
</a></h3>
695 <dt class=
"option-type-label">Type:
</dt>
696 <dd class=
"option-type">String
</dd>
698 <dt class=
"option-default-label">Default:
</dt>
699 <dd class=
"option-default">'mm/dd/yy'
</dd>
703 <div class=
"option-description">
704 <p>The format for parsed and displayed dates. This attribute is one of the regionalisation attributes. For a full list of the possible formats see the
<code><a href=
"http://docs.jquery.com/UI/Datepicker/formatDate" title=
"UI/Datepicker/formatDate">formatDate
</a></code> function.
</p>
706 <div class=
"option-examples">
707 <h4>Code examples
</h4>
708 <dl class=
"option-examples-list">
711 Initialize a datepicker with the
<code>dateFormat
</code> option specified.
714 <pre><code>$(
".selector" ).datepicker({ dateFormat: 'yy-mm-dd' });
</code></pre>
719 Get or set the
<code>dateFormat
</code> option, after init.
723 var dateFormat = $(
".selector" ).datepicker(
"option",
"dateFormat" );
725 $(
".selector" ).datepicker(
"option",
"dateFormat", 'yy-mm-dd' );
</code></pre>
733 <li class=
"option" id=
"option-dayNames">
734 <div class=
"option-header">
735 <h3 class=
"option-name"><a href=
"#option-dayNames">dayNames
</a></h3>
737 <dt class=
"option-type-label">Type:
</dt>
738 <dd class=
"option-type">Array
</dd>
740 <dt class=
"option-default-label">Default:
</dt>
741 <dd class=
"option-default">['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
</dd>
745 <div class=
"option-description">
746 <p>The list of long day names, starting from Sunday, for use as requested via the
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-dateFormat" title=
"UI/Datepicker">dateFormat
</a></code> setting. They also appear as popup hints when hovering over the corresponding column headings. This attribute is one of the regionalisation attributes.
</p>
748 <div class=
"option-examples">
749 <h4>Code examples
</h4>
750 <dl class=
"option-examples-list">
753 Initialize a datepicker with the
<code>dayNames
</code> option specified.
756 <pre><code>$(
".selector" ).datepicker({ dayNames: ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'] });
</code></pre>
761 Get or set the
<code>dayNames
</code> option, after init.
765 var dayNames = $(
".selector" ).datepicker(
"option",
"dayNames" );
767 $(
".selector" ).datepicker(
"option",
"dayNames", ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'] );
</code></pre>
775 <li class=
"option" id=
"option-dayNamesMin">
776 <div class=
"option-header">
777 <h3 class=
"option-name"><a href=
"#option-dayNamesMin">dayNamesMin
</a></h3>
779 <dt class=
"option-type-label">Type:
</dt>
780 <dd class=
"option-type">Array
</dd>
782 <dt class=
"option-default-label">Default:
</dt>
783 <dd class=
"option-default">['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']
</dd>
787 <div class=
"option-description">
788 <p>The list of minimised day names, starting from Sunday, for use as column headers within the datepicker. This attribute is one of the regionalisation attributes.
</p>
790 <div class=
"option-examples">
791 <h4>Code examples
</h4>
792 <dl class=
"option-examples-list">
795 Initialize a datepicker with the
<code>dayNamesMin
</code> option specified.
798 <pre><code>$(
".selector" ).datepicker({ dayNamesMin: ['Di', 'Lu', 'Ma', 'Me', 'Je', 'Ve', 'Sa'] });
</code></pre>
803 Get or set the
<code>dayNamesMin
</code> option, after init.
807 var dayNamesMin = $(
".selector" ).datepicker(
"option",
"dayNamesMin" );
809 $(
".selector" ).datepicker(
"option",
"dayNamesMin", ['Di', 'Lu', 'Ma', 'Me', 'Je', 'Ve', 'Sa'] );
</code></pre>
817 <li class=
"option" id=
"option-dayNamesShort">
818 <div class=
"option-header">
819 <h3 class=
"option-name"><a href=
"#option-dayNamesShort">dayNamesShort
</a></h3>
821 <dt class=
"option-type-label">Type:
</dt>
822 <dd class=
"option-type">Array
</dd>
824 <dt class=
"option-default-label">Default:
</dt>
825 <dd class=
"option-default">['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
</dd>
829 <div class=
"option-description">
830 <p>The list of abbreviated day names, starting from Sunday, for use as requested via the
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-dateFormat" title=
"UI/Datepicker">dateFormat
</a></code> setting. This attribute is one of the regionalisation attributes.
</p>
832 <div class=
"option-examples">
833 <h4>Code examples
</h4>
834 <dl class=
"option-examples-list">
837 Initialize a datepicker with the
<code>dayNamesShort
</code> option specified.
840 <pre><code>$(
".selector" ).datepicker({ dayNamesShort: ['Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam'] });
</code></pre>
845 Get or set the
<code>dayNamesShort
</code> option, after init.
849 var dayNamesShort = $(
".selector" ).datepicker(
"option",
"dayNamesShort" );
851 $(
".selector" ).datepicker(
"option",
"dayNamesShort", ['Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam'] );
</code></pre>
859 <li class=
"option" id=
"option-defaultDate">
860 <div class=
"option-header">
861 <h3 class=
"option-name"><a href=
"#option-defaultDate">defaultDate
</a></h3>
863 <dt class=
"option-type-label">Type:
</dt>
864 <dd class=
"option-type">Date, Number, String
</dd>
866 <dt class=
"option-default-label">Default:
</dt>
867 <dd class=
"option-default">null
</dd>
871 <div class=
"option-description">
872 <p>Set the date to highlight on first opening if the field is blank. Specify either an actual date via a Date object or as a string in the current
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-dateFormat" title=
"UI/Datepicker">dateFormat
</a></code>, or 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 for today.
</p>
874 <div class=
"option-examples">
875 <h4>Code examples
</h4>
876 <dl class=
"option-examples-list">
879 Initialize a datepicker with the
<code>defaultDate
</code> option specified.
882 <pre><code>$(
".selector" ).datepicker({ defaultDate: +
7 });
</code></pre>
887 Get or set the
<code>defaultDate
</code> option, after init.
891 var defaultDate = $(
".selector" ).datepicker(
"option",
"defaultDate" );
893 $(
".selector" ).datepicker(
"option",
"defaultDate", +
7 );
</code></pre>
901 <li class=
"option" id=
"option-duration">
902 <div class=
"option-header">
903 <h3 class=
"option-name"><a href=
"#option-duration">duration
</a></h3>
905 <dt class=
"option-type-label">Type:
</dt>
906 <dd class=
"option-type">String, Number
</dd>
908 <dt class=
"option-default-label">Default:
</dt>
909 <dd class=
"option-default">'normal'
</dd>
913 <div class=
"option-description">
914 <p>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").
</p>
916 <div class=
"option-examples">
917 <h4>Code examples
</h4>
918 <dl class=
"option-examples-list">
921 Initialize a datepicker with the
<code>duration
</code> option specified.
924 <pre><code>$(
".selector" ).datepicker({ duration: 'slow' });
</code></pre>
929 Get or set the
<code>duration
</code> option, after init.
933 var duration = $(
".selector" ).datepicker(
"option",
"duration" );
935 $(
".selector" ).datepicker(
"option",
"duration", 'slow' );
</code></pre>
943 <li class=
"option" id=
"option-firstDay">
944 <div class=
"option-header">
945 <h3 class=
"option-name"><a href=
"#option-firstDay">firstDay
</a></h3>
947 <dt class=
"option-type-label">Type:
</dt>
948 <dd class=
"option-type">Number
</dd>
950 <dt class=
"option-default-label">Default:
</dt>
951 <dd class=
"option-default">0</dd>
955 <div class=
"option-description">
956 <p>Set the first day of the week: Sunday is
0, Monday is
1, ... This attribute is one of the regionalisation attributes.
</p>
958 <div class=
"option-examples">
959 <h4>Code examples
</h4>
960 <dl class=
"option-examples-list">
963 Initialize a datepicker with the
<code>firstDay
</code> option specified.
966 <pre><code>$(
".selector" ).datepicker({ firstDay:
1 });
</code></pre>
971 Get or set the
<code>firstDay
</code> option, after init.
975 var firstDay = $(
".selector" ).datepicker(
"option",
"firstDay" );
977 $(
".selector" ).datepicker(
"option",
"firstDay",
1 );
</code></pre>
985 <li class=
"option" id=
"option-gotoCurrent">
986 <div class=
"option-header">
987 <h3 class=
"option-name"><a href=
"#option-gotoCurrent">gotoCurrent
</a></h3>
989 <dt class=
"option-type-label">Type:
</dt>
990 <dd class=
"option-type">Boolean
</dd>
992 <dt class=
"option-default-label">Default:
</dt>
993 <dd class=
"option-default">false
</dd>
997 <div class=
"option-description">
998 <p>When true the current day link moves to the currently selected date instead of today.
</p>
1000 <div class=
"option-examples">
1001 <h4>Code examples
</h4>
1002 <dl class=
"option-examples-list">
1005 Initialize a datepicker with the
<code>gotoCurrent
</code> option specified.
1008 <pre><code>$(
".selector" ).datepicker({ gotoCurrent: true });
</code></pre>
1013 Get or set the
<code>gotoCurrent
</code> option, after init.
1017 var gotoCurrent = $(
".selector" ).datepicker(
"option",
"gotoCurrent" );
1019 $(
".selector" ).datepicker(
"option",
"gotoCurrent", true );
</code></pre>
1027 <li class=
"option" id=
"option-hideIfNoPrevNext">
1028 <div class=
"option-header">
1029 <h3 class=
"option-name"><a href=
"#option-hideIfNoPrevNext">hideIfNoPrevNext
</a></h3>
1031 <dt class=
"option-type-label">Type:
</dt>
1032 <dd class=
"option-type">Boolean
</dd>
1034 <dt class=
"option-default-label">Default:
</dt>
1035 <dd class=
"option-default">false
</dd>
1039 <div class=
"option-description">
1040 <p>Normally the previous and next links are disabled when not applicable (see
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-minDate" title=
"UI/Datepicker">minDate
</a></code>/
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-maxDate" title=
"UI/Datepicker">maxDate
</a></code>). You can hide them altogether by setting this attribute to true.
</p>
1042 <div class=
"option-examples">
1043 <h4>Code examples
</h4>
1044 <dl class=
"option-examples-list">
1047 Initialize a datepicker with the
<code>hideIfNoPrevNext
</code> option specified.
1050 <pre><code>$(
".selector" ).datepicker({ hideIfNoPrevNext: true });
</code></pre>
1055 Get or set the
<code>hideIfNoPrevNext
</code> option, after init.
1059 var hideIfNoPrevNext = $(
".selector" ).datepicker(
"option",
"hideIfNoPrevNext" );
1061 $(
".selector" ).datepicker(
"option",
"hideIfNoPrevNext", true );
</code></pre>
1069 <li class=
"option" id=
"option-isRTL">
1070 <div class=
"option-header">
1071 <h3 class=
"option-name"><a href=
"#option-isRTL">isRTL
</a></h3>
1073 <dt class=
"option-type-label">Type:
</dt>
1074 <dd class=
"option-type">Boolean
</dd>
1076 <dt class=
"option-default-label">Default:
</dt>
1077 <dd class=
"option-default">false
</dd>
1081 <div class=
"option-description">
1082 <p>True if the current language is drawn from right to left. This attribute is one of the regionalisation attributes.
</p>
1084 <div class=
"option-examples">
1085 <h4>Code examples
</h4>
1086 <dl class=
"option-examples-list">
1089 Initialize a datepicker with the
<code>isRTL
</code> option specified.
1092 <pre><code>$(
".selector" ).datepicker({ isRTL: true });
</code></pre>
1097 Get or set the
<code>isRTL
</code> option, after init.
1101 var isRTL = $(
".selector" ).datepicker(
"option",
"isRTL" );
1103 $(
".selector" ).datepicker(
"option",
"isRTL", true );
</code></pre>
1111 <li class=
"option" id=
"option-maxDate">
1112 <div class=
"option-header">
1113 <h3 class=
"option-name"><a href=
"#option-maxDate">maxDate
</a></h3>
1115 <dt class=
"option-type-label">Type:
</dt>
1116 <dd class=
"option-type">Date, Number, String
</dd>
1118 <dt class=
"option-default-label">Default:
</dt>
1119 <dd class=
"option-default">null
</dd>
1123 <div class=
"option-description">
1124 <p>Set a maximum selectable date via a Date object or as a string in the current
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-dateFormat" title=
"UI/Datepicker">dateFormat
</a></code>, or 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 +
1w'), or null for no limit.
</p>
1126 <div class=
"option-examples">
1127 <h4>Code examples
</h4>
1128 <dl class=
"option-examples-list">
1131 Initialize a datepicker with the
<code>maxDate
</code> option specified.
1134 <pre><code>$(
".selector" ).datepicker({ maxDate: '+
1m +
1w' });
</code></pre>
1139 Get or set the
<code>maxDate
</code> option, after init.
1143 var maxDate = $(
".selector" ).datepicker(
"option",
"maxDate" );
1145 $(
".selector" ).datepicker(
"option",
"maxDate", '+
1m +
1w' );
</code></pre>
1153 <li class=
"option" id=
"option-minDate">
1154 <div class=
"option-header">
1155 <h3 class=
"option-name"><a href=
"#option-minDate">minDate
</a></h3>
1157 <dt class=
"option-type-label">Type:
</dt>
1158 <dd class=
"option-type">Date, Number, String
</dd>
1160 <dt class=
"option-default-label">Default:
</dt>
1161 <dd class=
"option-default">null
</dd>
1165 <div class=
"option-description">
1166 <p>Set a minimum selectable date via a Date object or as a string in the current
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-dateFormat" title=
"UI/Datepicker">dateFormat
</a></code>, or 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. '-
1y -
1m'), or null for no limit.
</p>
1168 <div class=
"option-examples">
1169 <h4>Code examples
</h4>
1170 <dl class=
"option-examples-list">
1173 Initialize a datepicker with the
<code>minDate
</code> option specified.
1176 <pre><code>$(
".selector" ).datepicker({ minDate: new Date(
2007,
1 -
1,
1) });
</code></pre>
1181 Get or set the
<code>minDate
</code> option, after init.
1185 var minDate = $(
".selector" ).datepicker(
"option",
"minDate" );
1187 $(
".selector" ).datepicker(
"option",
"minDate", new Date(
2007,
1 -
1,
1) );
</code></pre>
1195 <li class=
"option" id=
"option-monthNames">
1196 <div class=
"option-header">
1197 <h3 class=
"option-name"><a href=
"#option-monthNames">monthNames
</a></h3>
1199 <dt class=
"option-type-label">Type:
</dt>
1200 <dd class=
"option-type">Array
</dd>
1202 <dt class=
"option-default-label">Default:
</dt>
1203 <dd class=
"option-default">['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
</dd>
1207 <div class=
"option-description">
1208 <p>The list of full month names, for use as requested via the
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-dateFormat" title=
"UI/Datepicker">dateFormat
</a></code> setting. This attribute is one of the regionalisation attributes.
</p>
1210 <div class=
"option-examples">
1211 <h4>Code examples
</h4>
1212 <dl class=
"option-examples-list">
1215 Initialize a datepicker with the
<code>monthNames
</code> option specified.
1218 <pre><code>$(
".selector" ).datepicker({ monthNames: ['Januar','Februar','Marts','April','Maj','Juni','Juli','August','September','Oktober','November','December'] });
</code></pre>
1223 Get or set the
<code>monthNames
</code> option, after init.
1227 var monthNames = $(
".selector" ).datepicker(
"option",
"monthNames" );
1229 $(
".selector" ).datepicker(
"option",
"monthNames", ['Januar','Februar','Marts','April','Maj','Juni','Juli','August','September','Oktober','November','December'] );
</code></pre>
1237 <li class=
"option" id=
"option-monthNamesShort">
1238 <div class=
"option-header">
1239 <h3 class=
"option-name"><a href=
"#option-monthNamesShort">monthNamesShort
</a></h3>
1241 <dt class=
"option-type-label">Type:
</dt>
1242 <dd class=
"option-type">Array
</dd>
1244 <dt class=
"option-default-label">Default:
</dt>
1245 <dd class=
"option-default">['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
</dd>
1249 <div class=
"option-description">
1250 <p>The list of abbreviated month names, as used in the month header on each datepicker and as requested via the
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-dateFormat" title=
"UI/Datepicker">dateFormat
</a></code> setting. This attribute is one of the regionalisation attributes.
</p>
1252 <div class=
"option-examples">
1253 <h4>Code examples
</h4>
1254 <dl class=
"option-examples-list">
1257 Initialize a datepicker with the
<code>monthNamesShort
</code> option specified.
1260 <pre><code>$(
".selector" ).datepicker({ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun','Jul','Aug','Sep','Okt','Nov','Dec'] });
</code></pre>
1265 Get or set the
<code>monthNamesShort
</code> option, after init.
1269 var monthNamesShort = $(
".selector" ).datepicker(
"option",
"monthNamesShort" );
1271 $(
".selector" ).datepicker(
"option",
"monthNamesShort", ['Jan','Feb','Mar','Apr','Maj','Jun','Jul','Aug','Sep','Okt','Nov','Dec'] );
</code></pre>
1279 <li class=
"option" id=
"option-navigationAsDateFormat">
1280 <div class=
"option-header">
1281 <h3 class=
"option-name"><a href=
"#option-navigationAsDateFormat">navigationAsDateFormat
</a></h3>
1283 <dt class=
"option-type-label">Type:
</dt>
1284 <dd class=
"option-type">Boolean
</dd>
1286 <dt class=
"option-default-label">Default:
</dt>
1287 <dd class=
"option-default">false
</dd>
1291 <div class=
"option-description">
1292 <p>When true the
<code><a href=
"http://docs.jquery.com/UI/Datepicker/formatDate" title=
"UI/Datepicker/formatDate">formatDate
</a></code> function is applied to the
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-prevText" title=
"UI/Datepicker">prevText
</a></code>,
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-nextText" title=
"UI/Datepicker">nextText
</a></code>, and
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-currentText" title=
"UI/Datepicker">currentText
</a></code> values before display, allowing them to display the target month names for example.
</p>
1294 <div class=
"option-examples">
1295 <h4>Code examples
</h4>
1296 <dl class=
"option-examples-list">
1299 Initialize a datepicker with the
<code>navigationAsDateFormat
</code> option specified.
1302 <pre><code>$(
".selector" ).datepicker({ navigationAsDateFormat: true });
</code></pre>
1307 Get or set the
<code>navigationAsDateFormat
</code> option, after init.
1311 var navigationAsDateFormat = $(
".selector" ).datepicker(
"option",
"navigationAsDateFormat" );
1313 $(
".selector" ).datepicker(
"option",
"navigationAsDateFormat", true );
</code></pre>
1321 <li class=
"option" id=
"option-nextText">
1322 <div class=
"option-header">
1323 <h3 class=
"option-name"><a href=
"#option-nextText">nextText
</a></h3>
1325 <dt class=
"option-type-label">Type:
</dt>
1326 <dd class=
"option-type">String
</dd>
1328 <dt class=
"option-default-label">Default:
</dt>
1329 <dd class=
"option-default">'Next'
</dd>
1333 <div class=
"option-description">
1334 <p>The text to display for the next month link. This attribute is one of the regionalisation attributes. With the standard ThemeRoller styling, this value is replaced by an icon.
</p>
1336 <div class=
"option-examples">
1337 <h4>Code examples
</h4>
1338 <dl class=
"option-examples-list">
1341 Initialize a datepicker with the
<code>nextText
</code> option specified.
1344 <pre><code>$(
".selector" ).datepicker({ nextText: 'Later' });
</code></pre>
1349 Get or set the
<code>nextText
</code> option, after init.
1353 var nextText = $(
".selector" ).datepicker(
"option",
"nextText" );
1355 $(
".selector" ).datepicker(
"option",
"nextText", 'Later' );
</code></pre>
1363 <li class=
"option" id=
"option-numberOfMonths">
1364 <div class=
"option-header">
1365 <h3 class=
"option-name"><a href=
"#option-numberOfMonths">numberOfMonths
</a></h3>
1367 <dt class=
"option-type-label">Type:
</dt>
1368 <dd class=
"option-type">Number, Array
</dd>
1370 <dt class=
"option-default-label">Default:
</dt>
1371 <dd class=
"option-default">1</dd>
1375 <div class=
"option-description">
1376 <p>Set how many months to show at once. The value can be a straight integer, or can be a two-element array to define the number of rows and columns to display.
</p>
1378 <div class=
"option-examples">
1379 <h4>Code examples
</h4>
1380 <dl class=
"option-examples-list">
1383 Initialize a datepicker with the
<code>numberOfMonths
</code> option specified.
1386 <pre><code>$(
".selector" ).datepicker({ numberOfMonths: [
2,
3] });
</code></pre>
1391 Get or set the
<code>numberOfMonths
</code> option, after init.
1395 var numberOfMonths = $(
".selector" ).datepicker(
"option",
"numberOfMonths" );
1397 $(
".selector" ).datepicker(
"option",
"numberOfMonths", [
2,
3] );
</code></pre>
1405 <li class=
"option" id=
"option-prevText">
1406 <div class=
"option-header">
1407 <h3 class=
"option-name"><a href=
"#option-prevText">prevText
</a></h3>
1409 <dt class=
"option-type-label">Type:
</dt>
1410 <dd class=
"option-type">String
</dd>
1412 <dt class=
"option-default-label">Default:
</dt>
1413 <dd class=
"option-default">'Prev'
</dd>
1417 <div class=
"option-description">
1418 <p>The text to display for the previous month link. This attribute is one of the regionalisation attributes. With the standard ThemeRoller styling, this value is replaced by an icon.
</p>
1420 <div class=
"option-examples">
1421 <h4>Code examples
</h4>
1422 <dl class=
"option-examples-list">
1425 Initialize a datepicker with the
<code>prevText
</code> option specified.
1428 <pre><code>$(
".selector" ).datepicker({ prevText: 'Earlier' });
</code></pre>
1433 Get or set the
<code>prevText
</code> option, after init.
1437 var prevText = $(
".selector" ).datepicker(
"option",
"prevText" );
1439 $(
".selector" ).datepicker(
"option",
"prevText", 'Earlier' );
</code></pre>
1447 <li class=
"option" id=
"option-selectOtherMonths">
1448 <div class=
"option-header">
1449 <h3 class=
"option-name"><a href=
"#option-selectOtherMonths">selectOtherMonths
</a></h3>
1451 <dt class=
"option-type-label">Type:
</dt>
1452 <dd class=
"option-type">Boolean
</dd>
1454 <dt class=
"option-default-label">Default:
</dt>
1455 <dd class=
"option-default">false
</dd>
1459 <div class=
"option-description">
1460 <p>When true days in other months shown before or after the current month are selectable. This only applies if
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-showOtherMonths" title=
"UI/Datepicker">showOtherMonths
</a></code> is also true.
</p>
1462 <div class=
"option-examples">
1463 <h4>Code examples
</h4>
1464 <dl class=
"option-examples-list">
1467 Initialize a datepicker with the
<code>selectOtherMonths
</code> option specified.
1470 <pre><code>$(
".selector" ).datepicker({ selectOtherMonths: true });
</code></pre>
1475 Get or set the
<code>selectOtherMonths
</code> option, after init.
1479 var selectOtherMonths = $(
".selector" ).datepicker(
"option",
"selectOtherMonths" );
1481 $(
".selector" ).datepicker(
"option",
"selectOtherMonths", true );
</code></pre>
1489 <li class=
"option" id=
"option-shortYearCutoff">
1490 <div class=
"option-header">
1491 <h3 class=
"option-name"><a href=
"#option-shortYearCutoff">shortYearCutoff
</a></h3>
1493 <dt class=
"option-type-label">Type:
</dt>
1494 <dd class=
"option-type">String, Number
</dd>
1496 <dt class=
"option-default-label">Default:
</dt>
1497 <dd class=
"option-default">'+
10'
</dd>
1501 <div class=
"option-description">
1502 <p>Set the cutoff year for determining the century for a date (used in conjunction with
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-dateFormat" title=
"UI/Datepicker">dateFormat
</a></code> 'y'). If a numeric value (
0-
99) is provided then this value is used directly. If a string value is provided then it is converted to a number and added to the current year. Once the cutoff year is calculated, any dates entered with a year value less than or equal to it are considered to be in the current century, while those greater than it are deemed to be in the previous century.
</p>
1504 <div class=
"option-examples">
1505 <h4>Code examples
</h4>
1506 <dl class=
"option-examples-list">
1509 Initialize a datepicker with the
<code>shortYearCutoff
</code> option specified.
1512 <pre><code>$(
".selector" ).datepicker({ shortYearCutoff:
50 });
</code></pre>
1517 Get or set the
<code>shortYearCutoff
</code> option, after init.
1521 var shortYearCutoff = $(
".selector" ).datepicker(
"option",
"shortYearCutoff" );
1523 $(
".selector" ).datepicker(
"option",
"shortYearCutoff",
50 );
</code></pre>
1531 <li class=
"option" id=
"option-showAnim">
1532 <div class=
"option-header">
1533 <h3 class=
"option-name"><a href=
"#option-showAnim">showAnim
</a></h3>
1535 <dt class=
"option-type-label">Type:
</dt>
1536 <dd class=
"option-type">String
</dd>
1538 <dt class=
"option-default-label">Default:
</dt>
1539 <dd class=
"option-default">'show'
</dd>
1543 <div class=
"option-description">
1544 <p>Set the name of the animation used to show/hide the datepicker. Use 'show' (the default), 'slideDown', 'fadeIn', any of the show/hide
<a href=
"http://docs.jquery.com/UI/Effects" class=
"external text" title=
"http://docs.jquery.com/UI/Effects">jQuery UI effects
</a>, or '' for no animation.
</p>
1546 <div class=
"option-examples">
1547 <h4>Code examples
</h4>
1548 <dl class=
"option-examples-list">
1551 Initialize a datepicker with the
<code>showAnim
</code> option specified.
1554 <pre><code>$(
".selector" ).datepicker({ showAnim: 'fold' });
</code></pre>
1559 Get or set the
<code>showAnim
</code> option, after init.
1563 var showAnim = $(
".selector" ).datepicker(
"option",
"showAnim" );
1565 $(
".selector" ).datepicker(
"option",
"showAnim", 'fold' );
</code></pre>
1573 <li class=
"option" id=
"option-showButtonPanel">
1574 <div class=
"option-header">
1575 <h3 class=
"option-name"><a href=
"#option-showButtonPanel">showButtonPanel
</a></h3>
1577 <dt class=
"option-type-label">Type:
</dt>
1578 <dd class=
"option-type">Boolean
</dd>
1580 <dt class=
"option-default-label">Default:
</dt>
1581 <dd class=
"option-default">false
</dd>
1585 <div class=
"option-description">
1586 <p>Whether to show the button panel.
</p>
1588 <div class=
"option-examples">
1589 <h4>Code examples
</h4>
1590 <dl class=
"option-examples-list">
1593 Initialize a datepicker with the
<code>showButtonPanel
</code> option specified.
1596 <pre><code>$(
".selector" ).datepicker({ showButtonPanel: true });
</code></pre>
1601 Get or set the
<code>showButtonPanel
</code> option, after init.
1605 var showButtonPanel = $(
".selector" ).datepicker(
"option",
"showButtonPanel" );
1607 $(
".selector" ).datepicker(
"option",
"showButtonPanel", true );
</code></pre>
1615 <li class=
"option" id=
"option-showCurrentAtPos">
1616 <div class=
"option-header">
1617 <h3 class=
"option-name"><a href=
"#option-showCurrentAtPos">showCurrentAtPos
</a></h3>
1619 <dt class=
"option-type-label">Type:
</dt>
1620 <dd class=
"option-type">Number
</dd>
1622 <dt class=
"option-default-label">Default:
</dt>
1623 <dd class=
"option-default">0</dd>
1627 <div class=
"option-description">
1628 <p>Specify where in a
<a href=
"http://docs.jquery.com/UI/Datepicker#option-numberOfMonths" title=
"UI/Datepicker">multi-month
</a> display the current month shows, starting from
0 at the top/left.
</p>
1630 <div class=
"option-examples">
1631 <h4>Code examples
</h4>
1632 <dl class=
"option-examples-list">
1635 Initialize a datepicker with the
<code>showCurrentAtPos
</code> option specified.
1638 <pre><code>$(
".selector" ).datepicker({ showCurrentAtPos:
3 });
</code></pre>
1643 Get or set the
<code>showCurrentAtPos
</code> option, after init.
1647 var showCurrentAtPos = $(
".selector" ).datepicker(
"option",
"showCurrentAtPos" );
1649 $(
".selector" ).datepicker(
"option",
"showCurrentAtPos",
3 );
</code></pre>
1657 <li class=
"option" id=
"option-showMonthAfterYear">
1658 <div class=
"option-header">
1659 <h3 class=
"option-name"><a href=
"#option-showMonthAfterYear">showMonthAfterYear
</a></h3>
1661 <dt class=
"option-type-label">Type:
</dt>
1662 <dd class=
"option-type">Boolean
</dd>
1664 <dt class=
"option-default-label">Default:
</dt>
1665 <dd class=
"option-default">false
</dd>
1669 <div class=
"option-description">
1670 <p>Whether to show the month after the year in the header. This attribute is one of the regionalisation attributes.
</p>
1672 <div class=
"option-examples">
1673 <h4>Code examples
</h4>
1674 <dl class=
"option-examples-list">
1677 Initialize a datepicker with the
<code>showMonthAfterYear
</code> option specified.
1680 <pre><code>$(
".selector" ).datepicker({ showMonthAfterYear: true });
</code></pre>
1685 Get or set the
<code>showMonthAfterYear
</code> option, after init.
1689 var showMonthAfterYear = $(
".selector" ).datepicker(
"option",
"showMonthAfterYear" );
1691 $(
".selector" ).datepicker(
"option",
"showMonthAfterYear", true );
</code></pre>
1699 <li class=
"option" id=
"option-showOn">
1700 <div class=
"option-header">
1701 <h3 class=
"option-name"><a href=
"#option-showOn">showOn
</a></h3>
1703 <dt class=
"option-type-label">Type:
</dt>
1704 <dd class=
"option-type">String
</dd>
1706 <dt class=
"option-default-label">Default:
</dt>
1707 <dd class=
"option-default">'focus'
</dd>
1711 <div class=
"option-description">
1712 <p>Have the datepicker appear automatically when the field receives focus ('focus'), appear only when a button is clicked ('button'), or appear when either event takes place ('both').
</p>
1714 <div class=
"option-examples">
1715 <h4>Code examples
</h4>
1716 <dl class=
"option-examples-list">
1719 Initialize a datepicker with the
<code>showOn
</code> option specified.
1722 <pre><code>$(
".selector" ).datepicker({ showOn: 'both' });
</code></pre>
1727 Get or set the
<code>showOn
</code> option, after init.
1731 var showOn = $(
".selector" ).datepicker(
"option",
"showOn" );
1733 $(
".selector" ).datepicker(
"option",
"showOn", 'both' );
</code></pre>
1741 <li class=
"option" id=
"option-showOptions">
1742 <div class=
"option-header">
1743 <h3 class=
"option-name"><a href=
"#option-showOptions">showOptions
</a></h3>
1745 <dt class=
"option-type-label">Type:
</dt>
1746 <dd class=
"option-type">Options
</dd>
1748 <dt class=
"option-default-label">Default:
</dt>
1749 <dd class=
"option-default">{}
</dd>
1753 <div class=
"option-description">
1754 <p>If using one of the jQuery UI effects for
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-showAnim" title=
"UI/Datepicker">showAnim
</a></code>, you can provide additional settings for that animation via this option.
</p>
1756 <div class=
"option-examples">
1757 <h4>Code examples
</h4>
1758 <dl class=
"option-examples-list">
1761 Initialize a datepicker with the
<code>showOptions
</code> option specified.
1764 <pre><code>$(
".selector" ).datepicker({ showOptions: {direction: 'up' });
</code></pre>
1769 Get or set the
<code>showOptions
</code> option, after init.
1773 var showOptions = $(
".selector" ).datepicker(
"option",
"showOptions" );
1775 $(
".selector" ).datepicker(
"option",
"showOptions", {direction: 'up' );
</code></pre>
1783 <li class=
"option" id=
"option-showOtherMonths">
1784 <div class=
"option-header">
1785 <h3 class=
"option-name"><a href=
"#option-showOtherMonths">showOtherMonths
</a></h3>
1787 <dt class=
"option-type-label">Type:
</dt>
1788 <dd class=
"option-type">Boolean
</dd>
1790 <dt class=
"option-default-label">Default:
</dt>
1791 <dd class=
"option-default">false
</dd>
1795 <div class=
"option-description">
1796 <p>Display dates in other months (non-selectable) at the start or end of the current month. To make these days selectable use
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-selectOtherMonths" title=
"UI/Datepicker">selectOtherMonths
</a></code>.
</p>
1798 <div class=
"option-examples">
1799 <h4>Code examples
</h4>
1800 <dl class=
"option-examples-list">
1803 Initialize a datepicker with the
<code>showOtherMonths
</code> option specified.
1806 <pre><code>$(
".selector" ).datepicker({ showOtherMonths: true });
</code></pre>
1811 Get or set the
<code>showOtherMonths
</code> option, after init.
1815 var showOtherMonths = $(
".selector" ).datepicker(
"option",
"showOtherMonths" );
1817 $(
".selector" ).datepicker(
"option",
"showOtherMonths", true );
</code></pre>
1825 <li class=
"option" id=
"option-showWeek">
1826 <div class=
"option-header">
1827 <h3 class=
"option-name"><a href=
"#option-showWeek">showWeek
</a></h3>
1829 <dt class=
"option-type-label">Type:
</dt>
1830 <dd class=
"option-type">Boolean
</dd>
1832 <dt class=
"option-default-label">Default:
</dt>
1833 <dd class=
"option-default">false
</dd>
1837 <div class=
"option-description">
1838 <p>When true a column is added to show the week of the year. The
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-calculateWeek" title=
"UI/Datepicker">calculateWeek
</a></code> option determines how the week of the year is calculated. You may also want to change the
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-firstDay" title=
"UI/Datepicker">firstDay
</a></code> option.
</p>
1840 <div class=
"option-examples">
1841 <h4>Code examples
</h4>
1842 <dl class=
"option-examples-list">
1845 Initialize a datepicker with the
<code>showWeek
</code> option specified.
1848 <pre><code>$(
".selector" ).datepicker({ showWeek: true });
</code></pre>
1853 Get or set the
<code>showWeek
</code> option, after init.
1857 var showWeek = $(
".selector" ).datepicker(
"option",
"showWeek" );
1859 $(
".selector" ).datepicker(
"option",
"showWeek", true );
</code></pre>
1867 <li class=
"option" id=
"option-stepMonths">
1868 <div class=
"option-header">
1869 <h3 class=
"option-name"><a href=
"#option-stepMonths">stepMonths
</a></h3>
1871 <dt class=
"option-type-label">Type:
</dt>
1872 <dd class=
"option-type">Number
</dd>
1874 <dt class=
"option-default-label">Default:
</dt>
1875 <dd class=
"option-default">1</dd>
1879 <div class=
"option-description">
1880 <p>Set how many months to move when clicking the Previous/Next links.
</p>
1882 <div class=
"option-examples">
1883 <h4>Code examples
</h4>
1884 <dl class=
"option-examples-list">
1887 Initialize a datepicker with the
<code>stepMonths
</code> option specified.
1890 <pre><code>$(
".selector" ).datepicker({ stepMonths:
3 });
</code></pre>
1895 Get or set the
<code>stepMonths
</code> option, after init.
1899 var stepMonths = $(
".selector" ).datepicker(
"option",
"stepMonths" );
1901 $(
".selector" ).datepicker(
"option",
"stepMonths",
3 );
</code></pre>
1909 <li class=
"option" id=
"option-weekHeader">
1910 <div class=
"option-header">
1911 <h3 class=
"option-name"><a href=
"#option-weekHeader">weekHeader
</a></h3>
1913 <dt class=
"option-type-label">Type:
</dt>
1914 <dd class=
"option-type">String
</dd>
1916 <dt class=
"option-default-label">Default:
</dt>
1917 <dd class=
"option-default">'Wk'
</dd>
1921 <div class=
"option-description">
1922 <p>The text to display for the week of the year column heading. This attribute is one of the regionalisation attributes. Use
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-showWeek" title=
"UI/Datepicker">showWeek
</a></code> to display this column.
</p>
1924 <div class=
"option-examples">
1925 <h4>Code examples
</h4>
1926 <dl class=
"option-examples-list">
1929 Initialize a datepicker with the
<code>weekHeader
</code> option specified.
1932 <pre><code>$(
".selector" ).datepicker({ weekHeader: 'W' });
</code></pre>
1937 Get or set the
<code>weekHeader
</code> option, after init.
1941 var weekHeader = $(
".selector" ).datepicker(
"option",
"weekHeader" );
1943 $(
".selector" ).datepicker(
"option",
"weekHeader", 'W' );
</code></pre>
1951 <li class=
"option" id=
"option-yearRange">
1952 <div class=
"option-header">
1953 <h3 class=
"option-name"><a href=
"#option-yearRange">yearRange
</a></h3>
1955 <dt class=
"option-type-label">Type:
</dt>
1956 <dd class=
"option-type">String
</dd>
1958 <dt class=
"option-default-label">Default:
</dt>
1959 <dd class=
"option-default">'c-
10:c+
10'
</dd>
1963 <div class=
"option-description">
1964 <p>Control the range of years displayed in the year drop-down: either relative to today's year (-nn:+nn), relative to the currently selected year (c-nn:c+nn), absolute (nnnn:nnnn), or combinations of these formats (nnnn:-nn). Note that this option only affects what appears in the drop-down, to restrict which dates may be selected use the
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-minDate" title=
"UI/Datepicker">minDate
</a></code> and/or
<code><a href=
"http://docs.jquery.com/UI/Datepicker#option-maxDate" title=
"UI/Datepicker">maxDate
</a></code> options.
</p>
1966 <div class=
"option-examples">
1967 <h4>Code examples
</h4>
1968 <dl class=
"option-examples-list">
1971 Initialize a datepicker with the
<code>yearRange
</code> option specified.
1974 <pre><code>$(
".selector" ).datepicker({ yearRange: '
2000:
2010' });
</code></pre>
1979 Get or set the
<code>yearRange
</code> option, after init.
1983 var yearRange = $(
".selector" ).datepicker(
"option",
"yearRange" );
1985 $(
".selector" ).datepicker(
"option",
"yearRange", '
2000:
2010' );
</code></pre>
1993 <li class=
"option" id=
"option-yearSuffix">
1994 <div class=
"option-header">
1995 <h3 class=
"option-name"><a href=
"#option-yearSuffix">yearSuffix
</a></h3>
1997 <dt class=
"option-type-label">Type:
</dt>
1998 <dd class=
"option-type">String
</dd>
2000 <dt class=
"option-default-label">Default:
</dt>
2001 <dd class=
"option-default">''
</dd>
2005 <div class=
"option-description">
2006 <p>Additional text to display after the year in the month headers. This attribute is one of the regionalisation attributes.
</p>
2008 <div class=
"option-examples">
2009 <h4>Code examples
</h4>
2010 <dl class=
"option-examples-list">
2013 Initialize a datepicker with the
<code>yearSuffix
</code> option specified.
2016 <pre><code>$(
".selector" ).datepicker({ yearSuffix: 'CE' });
</code></pre>
2021 Get or set the
<code>yearSuffix
</code> option, after init.
2025 var yearSuffix = $(
".selector" ).datepicker(
"option",
"yearSuffix" );
2027 $(
".selector" ).datepicker(
"option",
"yearSuffix", 'CE' );
</code></pre>
2037 <h2 class=
"top-header">Events
</h2>
2038 <ul class=
"events-list">
2040 <li class=
"event" id=
"event-beforeShow">
2041 <div class=
"event-header">
2042 <h3 class=
"event-name"><a href=
"#event-beforeShow">beforeShow
</a></h3>
2044 <dt class=
"event-type-label"></dt>
2045 <dd class=
"event-type">function(input, inst)
</dd>
2048 <div class=
"event-description">
2049 <p>Can be 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.
</p>
2051 <div class=
"event-examples">
2052 <h4>Code examples
</h4>
2053 <dl class=
"event-examples-list">
2056 Supply a callback function to handle the
<code>beforeShow
</code> event as an init option.
2059 <pre><code>$('.selector').datepicker({
2060 beforeShow: function(input, inst) { ... }
2069 <li class=
"event" id=
"event-beforeShowDay">
2070 <div class=
"event-header">
2071 <h3 class=
"event-name"><a href=
"#event-beforeShowDay">beforeShowDay
</a></h3>
2073 <dt class=
"event-type-label"></dt>
2074 <dd class=
"event-type">function(date)
</dd>
2077 <div class=
"event-description">
2078 <p>The function takes a date as a parameter and must return an array with [
0] equal to true/false indicating whether or not this date is selectable, [
1] equal to a CSS class name(s) or '' for the default presentation, and [
2] an optional popup tooltip for this date. It is called for each day in the datepicker before it is displayed.
</p>
2080 <div class=
"event-examples">
2081 <h4>Code examples
</h4>
2082 <dl class=
"event-examples-list">
2085 Supply a callback function to handle the
<code>beforeShowDay
</code> event as an init option.
2088 <pre><code>$('.selector').datepicker({
2089 beforeShowDay: function(date) { ... }
2098 <li class=
"event" id=
"event-onChangeMonthYear">
2099 <div class=
"event-header">
2100 <h3 class=
"event-name"><a href=
"#event-onChangeMonthYear">onChangeMonthYear
</a></h3>
2102 <dt class=
"event-type-label"></dt>
2103 <dd class=
"event-type">function(year, month, inst)
</dd>
2106 <div class=
"event-description">
2107 <p>Allows you to define your own event when the datepicker moves to a new month and/or year. The function receives the selected year, month (
1-
12), and the datepicker instance as parameters.
<code>this
</code> refers to the associated input field.
</p>
2109 <div class=
"event-examples">
2110 <h4>Code examples
</h4>
2111 <dl class=
"event-examples-list">
2114 Supply a callback function to handle the
<code>onChangeMonthYear
</code> event as an init option.
2117 <pre><code>$('.selector').datepicker({
2118 onChangeMonthYear: function(year, month, inst) { ... }
2127 <li class=
"event" id=
"event-onClose">
2128 <div class=
"event-header">
2129 <h3 class=
"event-name"><a href=
"#event-onClose">onClose
</a></h3>
2131 <dt class=
"event-type-label"></dt>
2132 <dd class=
"event-type">function(dateText, inst)
</dd>
2135 <div class=
"event-description">
2136 <p>Allows you to define your own event when the datepicker is closed, whether or not a date is selected. The function receives the selected date as text ('' if none) and the datepicker instance as parameters.
<code>this
</code> refers to the associated input field.
</p>
2138 <div class=
"event-examples">
2139 <h4>Code examples
</h4>
2140 <dl class=
"event-examples-list">
2143 Supply a callback function to handle the
<code>onClose
</code> event as an init option.
2146 <pre><code>$('.selector').datepicker({
2147 onClose: function(dateText, inst) { ... }
2156 <li class=
"event" id=
"event-onSelect">
2157 <div class=
"event-header">
2158 <h3 class=
"event-name"><a href=
"#event-onSelect">onSelect
</a></h3>
2160 <dt class=
"event-type-label"></dt>
2161 <dd class=
"event-type">function(dateText, inst)
</dd>
2164 <div class=
"event-description">
2165 <p>Allows you to define your own event when the datepicker is selected. The function receives the selected date as text and the datepicker instance as parameters.
<code>this
</code> refers to the associated input field.
</p>
2167 <div class=
"event-examples">
2168 <h4>Code examples
</h4>
2169 <dl class=
"event-examples-list">
2172 Supply a callback function to handle the
<code>onSelect
</code> event as an init option.
2175 <pre><code>$('.selector').datepicker({
2176 onSelect: function(dateText, inst) { ... }
2187 <h2 class=
"top-header">Methods
</h2>
2188 <ul class=
"methods-list">
2190 <li class=
"method" id=
"method-destroy">
2191 <div class=
"method-header">
2192 <h3 class=
"method-name"><a href=
"#method-destroy">destroy
</a></h3>
2194 <dt class=
"method-signature-label">Signature:
</dt>
2195 <dd class=
"method-signature">.datepicker(
"destroy"
2206 <div class=
"method-description">
2207 <p>Remove the datepicker functionality completely. This will return the element back to its pre-init state.
</p>
2212 <li class=
"method" id=
"method-disable">
2213 <div class=
"method-header">
2214 <h3 class=
"method-name"><a href=
"#method-disable">disable
</a></h3>
2216 <dt class=
"method-signature-label">Signature:
</dt>
2217 <dd class=
"method-signature">.datepicker(
"disable"
2228 <div class=
"method-description">
2229 <p>Disable the datepicker.
</p>
2234 <li class=
"method" id=
"method-enable">
2235 <div class=
"method-header">
2236 <h3 class=
"method-name"><a href=
"#method-enable">enable
</a></h3>
2238 <dt class=
"method-signature-label">Signature:
</dt>
2239 <dd class=
"method-signature">.datepicker(
"enable"
2250 <div class=
"method-description">
2251 <p>Enable the datepicker.
</p>
2256 <li class=
"method" id=
"method-option">
2257 <div class=
"method-header">
2258 <h3 class=
"method-name"><a href=
"#method-option">option
</a></h3>
2260 <dt class=
"method-signature-label">Signature:
</dt>
2261 <dd class=
"method-signature">.datepicker(
"option"
2265 ,
<span class=
"optional">[
</span>value
<span class=
"optional">]
</span>
2272 <div class=
"method-description">
2273 <p>Get or set any datepicker option. If no value is specified, will act as a getter.
</p>
2278 <li class=
"method" id=
"method-option">
2279 <div class=
"method-header">
2280 <h3 class=
"method-name"><a href=
"#method-option">option
</a></h3>
2282 <dt class=
"method-signature-label">Signature:
</dt>
2283 <dd class=
"method-signature">.datepicker(
"option"
2294 <div class=
"method-description">
2295 <p>Set multiple datepicker options at once by providing an options object.
</p>
2300 <li class=
"method" id=
"method-widget">
2301 <div class=
"method-header">
2302 <h3 class=
"method-name"><a href=
"#method-widget">widget
</a></h3>
2304 <dt class=
"method-signature-label">Signature:
</dt>
2305 <dd class=
"method-signature">.datepicker(
"widget"
2316 <div class=
"method-description">
2317 <p>Returns the .ui-datepicker element.
</p>
2322 <li class=
"method" id=
"method-dialog">
2323 <div class=
"method-header">
2324 <h3 class=
"method-name"><a href=
"#method-dialog">dialog
</a></h3>
2326 <dt class=
"method-signature-label">Signature:
</dt>
2327 <dd class=
"method-signature">.datepicker(
"dialog"
2331 ,
<span class=
"optional">[
</span>onSelect
<span class=
"optional">]
</span>
2333 ,
<span class=
"optional">[
</span>settings
<span class=
"optional">]
</span>
2335 ,
<span class=
"optional">[
</span>pos
<span class=
"optional">]
</span>)
</dd>
2338 <div class=
"method-description">
2339 <p>Open a datepicker in a
"dialog" box.
2340 </p><p>dateText: the initial date for the date picker as either a Date or a string in the current date format.
2341 </p><p>onSelect: A callback function when a date is selected. The function receives the date text and date picker instance as parameters.
2342 </p><p>settings: The new settings for the date picker.
2343 </p><p>pos: 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.
</p>
2348 <li class=
"method" id=
"method-isDisabled">
2349 <div class=
"method-header">
2350 <h3 class=
"method-name"><a href=
"#method-isDisabled">isDisabled
</a></h3>
2352 <dt class=
"method-signature-label">Signature:
</dt>
2353 <dd class=
"method-signature">.datepicker(
"isDisabled"
2364 <div class=
"method-description">
2365 <p>Determine whether a date picker has been disabled.
</p>
2370 <li class=
"method" id=
"method-hide">
2371 <div class=
"method-header">
2372 <h3 class=
"method-name"><a href=
"#method-hide">hide
</a></h3>
2374 <dt class=
"method-signature-label">Signature:
</dt>
2375 <dd class=
"method-signature">.datepicker(
"hide"
2386 <div class=
"method-description">
2387 <p>Close a previously opened date picker.
</p>
2392 <li class=
"method" id=
"method-show">
2393 <div class=
"method-header">
2394 <h3 class=
"method-name"><a href=
"#method-show">show
</a></h3>
2396 <dt class=
"method-signature-label">Signature:
</dt>
2397 <dd class=
"method-signature">.datepicker(
"show"
2408 <div class=
"method-description">
2409 <p>Call up a previously attached date picker.
</p>
2414 <li class=
"method" id=
"method-refresh">
2415 <div class=
"method-header">
2416 <h3 class=
"method-name"><a href=
"#method-refresh">refresh
</a></h3>
2418 <dt class=
"method-signature-label">Signature:
</dt>
2419 <dd class=
"method-signature">.datepicker(
"refresh"
2430 <div class=
"method-description">
2431 <p>Redraw a date picker, after having made some external modifications.
</p>
2436 <li class=
"method" id=
"method-getDate">
2437 <div class=
"method-header">
2438 <h3 class=
"method-name"><a href=
"#method-getDate">getDate
</a></h3>
2440 <dt class=
"method-signature-label">Signature:
</dt>
2441 <dd class=
"method-signature">.datepicker(
"getDate"
2452 <div class=
"method-description">
2453 <p>Returns the current date for the datepicker or null if no date has been selected.
</p>
2458 <li class=
"method" id=
"method-setDate">
2459 <div class=
"method-header">
2460 <h3 class=
"method-name"><a href=
"#method-setDate">setDate
</a></h3>
2462 <dt class=
"method-signature-label">Signature:
</dt>
2463 <dd class=
"method-signature">.datepicker(
"setDate"
2474 <div class=
"method-description">
2475 <p>Sets the current date for the datepicker. The new date may be a Date object or a string in the current
<a href=
"http://docs.jquery.com/UI/Datepicker#option-dateFormat" title=
"UI/Datepicker">date format
</a> (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.
</p>
2482 <h2 class=
"top-header">Theming
</h2>
2483 <p>The jQuery UI Datepicker plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain.
2485 <p>If a deeper level of customization is needed, there are widget-specific classes referenced within the jquery.ui.datepicker.css stylesheet that can be modified. These classes are highlighed in bold below.
2488 <h3>Sample markup with jQuery UI CSS Framework classes
</h3>
2489 <div id=
"ui-datepicker-div
" class=
"<strong>ui-datepicker
</strong> ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible
"><br />
2490 <div class=
"<strong>ui-datepicker-header
</strong> ui-widget-header ui-helper-clearfix ui-corner-all
"><br />
2491 <a class=
"<strong>ui-datepicker-prev
</strong> ui-corner-all
">title=
"Prev
"><span class=
"ui-icon ui-icon-circle-triangle-w
">Prev
</span
></a
><br />
2492 <a class=
"<strong>ui-datepicker-next
</strong> ui-corner-all
" title=
"Next
"><span class=
"ui-icon ui-icon-circle-triangle-e
">Next
</span
></a
><br />
2493 <div class=
"<strong>ui-datepicker-title
</strong>"><br />
2494 <span class=
"<strong>ui-datepicker-month
</strong>">January
</span
><span class=
"<strong>ui-datepicker-year
</strong>">2009</span
><br />
2495 </div
><br />
2496 </div
><br />
2497 <table class=
"<strong>ui-datepicker-calendar
</strong>"><br />
2498 <thead
><br />
2499 <tr
><br />
2500 <th class=
"<strong>ui-datepicker-week-end
</strong>"><span title=
"Sunday
">Su
</span
></th
><br />
2501 ...
<br />
2502 </tr
><br />
2503 </thead
><br />
2504 <tbody
><tr
><br />
2505 <td class=
"<strong>ui-datepicker-week-end ui-datepicker-other-month
</strong> "> 1 </td
><br />
2506 ...
<br />
2507 </tr
><br />
2508 </tbody
><br />
2509 </table
><br />
2510 <div class=
"<strong>ui-datepicker-buttonpane
</strong> ui-widget-content
"><br />
2511 <button type=
"button
" class=
"<strong>ui-datepicker-current
</strong> ui-state-default ui-priority-secondary ui-corner-all
">Today
</button
><br />
2512 <button type=
"button
" class=
"<strong>ui-datepicker-close
</strong> ui-state-default ui-priority-primary ui-corner-all
">Done
</button
><br />
2513 </div
><br />
2515 <p class=
"theme-note">
2517 Note: This is a sample of markup generated by the datepicker plugin, not markup you should use to create a datepicker. The only markup needed for that is
<input
type=
"text" /
> or
<div
></div
>.
2525 Pre-expand include size: 97232 bytes
2526 Post-expand include size: 193237 bytes
2527 Template argument size: 120737 bytes
2528 Maximum: 2097152 bytes
2531 <!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3774-1!1!0!!en!2 and timestamp 20100805033350 -->