source: main/trunk/greenstone3/web/interfaces/oran/js/jquery-ui-1.8rc1/docs/datepicker.html@ 24245

Last change on this file since 24245 was 24245, checked in by sjb48, 13 years ago

Oran code for supporting format changes to document.

  • Property svn:executable set to *
File size: 75.3 KB
Line 
1
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>
8</ul>
9<div class="UIAPIPlugin">
10 <h1>jQuery UI Datepicker</h1>
11 <div id="overview">
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 if 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:
17</p>
18<ul>
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>
27</ul>
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>
29<ul>
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/iso8601Week" title="UI/Datepicker/iso8601Week">$.datepicker.iso8601Week( date )</a> - Determine the week of the year for a given date: 1 to 53.</li>
33 <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>
34</ul>
35<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>
36<p>Datepicker provides support for localizing its content to cater for different languages
37 and date formats. Each localization is contained within its own file with the
38 language code appended to the name, e.g. <code>jquery.ui.datepicker-fr.js</code> for French.
39 These files are loaded after the main datepicker code. They add their settings to the set
40 of available localizations and automatically apply them as defaults for all instances.</p>
41<p>The <code>$.datepicker.regional</code> attribute holds an array of localizations,
42 indexed by language code, with '' referring to the default (English). Each entry is
43 an object with the following attributes: <code>closeText</code>, <code>prevText</code>,
44 <code>nextText</code>, <code>currentText</code>, <code>monthNames</code>,
45 <code>monthNamesShort</code>, <code>dayNames</code>, <code>dayNamesShort</code>,
46 <code>dayNamesMin</code>, <code>weekHeader</code>, <code>dateFormat</code>,
47 <code>firstDay</code>, <code>isRTL</code>, <code>showMonthAfterYear</code>,
48 and <code>yearSuffix</code>.</p>
49<p>You can restore the default localizations with:</p>
50<p><code>$.datepicker.setDefaults($.datepicker.regional['']);</code>
51</p>
52<p>And can then override an individual datepicker for a specific locale:</p>
53<p><code>$(selector).datepicker($.datepicker.regional['fr']);</code>
54</p>
55The 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>
56 </div>
57 <div id="overview-dependencies">
58 <h3>Dependencies</h3>
59 <ul>
60<li>UI Core</li>
61</ul>
62 </div>
63 <div id="overview-example">
64 <h3>Example</h3>
65 <div id="overview-example" class="example">
66<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
67<p><div id="demo" class="tabs-container" rel="220">
68A simple jQuery UI Datepicker.<br />
69</p>
70<pre>$(&quot;#datepicker&quot;).datepicker();
71</pre>
72<p></div><div id="source" class="tabs-container">
73</p>
74<pre>&lt;!DOCTYPE html&gt;
75&lt;html&gt;
76&lt;head&gt;
77 &lt;link type=&quot;text/css&quot; href=&quot;http://jqueryui.com/latest/themes/base/ui.all.css&quot; rel=&quot;stylesheet&quot; /&gt;
78 &lt;script type=&quot;text/javascript&quot; src=&quot;http://jqueryui.com/latest/jquery-1.3.2.js&quot;&gt;&lt;/script&gt;
79 &lt;script type=&quot;text/javascript&quot; src=&quot;http://jqueryui.com/latest/ui/ui.core.js&quot;&gt;&lt;/script&gt;
80 &lt;script type=&quot;text/javascript&quot; src=&quot;http://jqueryui.com/latest/ui/ui.datepicker.js&quot;&gt;&lt;/script&gt;
81 &lt;script type="text/javascript"&gt;
82 $(document).ready(function(){
83 $(&quot;#datepicker&quot;).datepicker();
84 });
85 &lt;/script&gt;
86&lt;/head&gt;
87&lt;body style="font-size:62.5%;"&gt;
88
89&lt;div type=&quot;text&quot; id=&quot;datepicker&quot;&gt;&lt;/div&gt;
90
91&lt;/body&gt;
92&lt;/html&gt;
93</pre>
94<p></div>
95</p><p></div>
96 </div>
97 </div>
98 <div id="options">
99 <h2 class="top-header">Options</h2>
100 <ul class="options-list">
101
102<li class="option" id="option-altField">
103 <div class="option-header">
104 <h3 class="option-name"><a href="#option-altField">altField</a></h3>
105 <dl>
106 <dt class="option-type-label">Type:</dt>
107 <dd class="option-type">String</dd>
108
109 <dt class="option-default-label">Default:</dt>
110 <dd class="option-default">''</dd>
111
112 </dl>
113 </div>
114 <div class="option-description">
115 <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>
116 </div>
117 <div class="option-examples">
118 <h4>Code examples</h4>
119 <dl class="option-examples-list">
120
121<dt>
122 Initialize a datepicker with the <code>altField</code> option specified.
123</dt>
124<dd>
125<pre><code>$('.selector').datepicker({ altField: '#actualDate' });</code></pre>
126</dd>
127
128
129<dt>
130 Get or set the <code>altField</code> option, after init.
131</dt>
132<dd>
133<pre><code>//getter
134var altField = $('.selector').datepicker('option', 'altField');
135//setter
136$('.selector').datepicker('option', 'altField', '#actualDate');</code></pre>
137</dd>
138
139 </dl>
140 </div>
141</li>
142
143
144<li class="option" id="option-altFormat">
145 <div class="option-header">
146 <h3 class="option-name"><a href="#option-altFormat">altFormat</a></h3>
147 <dl>
148 <dt class="option-type-label">Type:</dt>
149 <dd class="option-type">String</dd>
150
151 <dt class="option-default-label">Default:</dt>
152 <dd class="option-default">''</dd>
153
154 </dl>
155 </div>
156 <div class="option-description">
157 <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>
158 </div>
159 <div class="option-examples">
160 <h4>Code examples</h4>
161 <dl class="option-examples-list">
162
163<dt>
164 Initialize a datepicker with the <code>altFormat</code> option specified.
165</dt>
166<dd>
167<pre><code>$('.selector').datepicker({ altFormat: 'yy-mm-dd' });</code></pre>
168</dd>
169
170
171<dt>
172 Get or set the <code>altFormat</code> option, after init.
173</dt>
174<dd>
175<pre><code>//getter
176var altFormat = $('.selector').datepicker('option', 'altFormat');
177//setter
178$('.selector').datepicker('option', 'altFormat', 'yy-mm-dd');</code></pre>
179</dd>
180
181 </dl>
182 </div>
183</li>
184
185
186<li class="option" id="option-appendText">
187 <div class="option-header">
188 <h3 class="option-name"><a href="#option-appendText">appendText</a></h3>
189 <dl>
190 <dt class="option-type-label">Type:</dt>
191 <dd class="option-type">String</dd>
192
193 <dt class="option-default-label">Default:</dt>
194 <dd class="option-default">''</dd>
195
196 </dl>
197 </div>
198 <div class="option-description">
199 <p>The text to display after each date field, e.g. to show the required format.</p>
200 </div>
201 <div class="option-examples">
202 <h4>Code examples</h4>
203 <dl class="option-examples-list">
204
205<dt>
206 Initialize a datepicker with the <code>appendText</code> option specified.
207</dt>
208<dd>
209<pre><code>$('.selector').datepicker({ appendText: '(yyyy-mm-dd)' });</code></pre>
210</dd>
211
212
213<dt>
214 Get or set the <code>appendText</code> option, after init.
215</dt>
216<dd>
217<pre><code>//getter
218var appendText = $('.selector').datepicker('option', 'appendText');
219//setter
220$('.selector').datepicker('option', 'appendText', '(yyyy-mm-dd)');</code></pre>
221</dd>
222
223 </dl>
224 </div>
225</li>
226
227
228<li class="option" id="option-autoSize">
229 <div class="option-header">
230 <h3 class="option-name"><a href="#option-autoSize">autoSize</a></h3>
231 <dl>
232 <dt class="option-type-label">Type:</dt>
233 <dd class="option-type">Boolean</dd>
234
235 <dt class="option-default-label">Default:</dt>
236 <dd class="option-default">false</dd>
237
238 </dl>
239 </div>
240 <div class="option-description">
241 <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>
242 </div>
243 <div class="option-examples">
244 <h4>Code examples</h4>
245 <dl class="option-examples-list">
246
247<dt>
248 Initialize a datepicker with the <code>autoSize</code> option specified.
249</dt>
250<dd>
251<pre><code>$('.selector').datepicker({ autoSize: true });</code></pre>
252</dd>
253
254
255<dt>
256 Get or set the <code>autoSize</code> option, after init.
257</dt>
258<dd>
259<pre><code>//getter
260var autoSize = $('.selector').datepicker('option', 'autoSize');
261//setter
262$('.selector').datepicker('option', 'autoSize', true);</code></pre>
263</dd>
264
265 </dl>
266 </div>
267</li>
268
269
270<li class="option" id="option-buttonImage">
271 <div class="option-header">
272 <h3 class="option-name"><a href="#option-buttonImage">buttonImage</a></h3>
273 <dl>
274 <dt class="option-type-label">Type:</dt>
275 <dd class="option-type">String</dd>
276
277 <dt class="option-default-label">Default:</dt>
278 <dd class="option-default">''</dd>
279
280 </dl>
281 </div>
282 <div class="option-description">
283 <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>
284 </div>
285 <div class="option-examples">
286 <h4>Code examples</h4>
287 <dl class="option-examples-list">
288
289<dt>
290 Initialize a datepicker with the <code>buttonImage</code> option specified.
291</dt>
292<dd>
293<pre><code>$('.selector').datepicker({ buttonImage: '/images/datepicker.gif' });</code></pre>
294</dd>
295
296
297<dt>
298 Get or set the <code>buttonImage</code> option, after init.
299</dt>
300<dd>
301<pre><code>//getter
302var buttonImage = $('.selector').datepicker('option', 'buttonImage');
303//setter
304$('.selector').datepicker('option', 'buttonImage', '/images/datepicker.gif');</code></pre>
305</dd>
306
307 </dl>
308 </div>
309</li>
310
311
312<li class="option" id="option-buttonImageOnly">
313 <div class="option-header">
314 <h3 class="option-name"><a href="#option-buttonImageOnly">buttonImageOnly</a></h3>
315 <dl>
316 <dt class="option-type-label">Type:</dt>
317 <dd class="option-type">Boolean</dd>
318
319 <dt class="option-default-label">Default:</dt>
320 <dd class="option-default">false</dd>
321
322 </dl>
323 </div>
324 <div class="option-description">
325 <p>Set to true to place an image after the field to use as the trigger without it appearing on a button.</p>
326 </div>
327 <div class="option-examples">
328 <h4>Code examples</h4>
329 <dl class="option-examples-list">
330
331<dt>
332 Initialize a datepicker with the <code>buttonImageOnly</code> option specified.
333</dt>
334<dd>
335<pre><code>$('.selector').datepicker({ buttonImageOnly: true });</code></pre>
336</dd>
337
338
339<dt>
340 Get or set the <code>buttonImageOnly</code> option, after init.
341</dt>
342<dd>
343<pre><code>//getter
344var buttonImageOnly = $('.selector').datepicker('option', 'buttonImageOnly');
345//setter
346$('.selector').datepicker('option', 'buttonImageOnly', true);</code></pre>
347</dd>
348
349 </dl>
350 </div>
351</li>
352
353
354<li class="option" id="option-buttonText">
355 <div class="option-header">
356 <h3 class="option-name"><a href="#option-buttonText">buttonText</a></h3>
357 <dl>
358 <dt class="option-type-label">Type:</dt>
359 <dd class="option-type">String</dd>
360
361 <dt class="option-default-label">Default:</dt>
362 <dd class="option-default">'...'</dd>
363
364 </dl>
365 </div>
366 <div class="option-description">
367 <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>
368 </div>
369 <div class="option-examples">
370 <h4>Code examples</h4>
371 <dl class="option-examples-list">
372
373<dt>
374 Initialize a datepicker with the <code>buttonText</code> option specified.
375</dt>
376<dd>
377<pre><code>$('.selector').datepicker({ buttonText: 'Choose' });</code></pre>
378</dd>
379
380
381<dt>
382 Get or set the <code>buttonText</code> option, after init.
383</dt>
384<dd>
385<pre><code>//getter
386var buttonText = $('.selector').datepicker('option', 'buttonText');
387//setter
388$('.selector').datepicker('option', 'buttonText', 'Choose');</code></pre>
389</dd>
390
391 </dl>
392 </div>
393</li>
394
395
396<li class="option" id="option-calculateWeek">
397 <div class="option-header">
398 <h3 class="option-name"><a href="#option-calculateWeek">calculateWeek</a></h3>
399 <dl>
400 <dt class="option-type-label">Type:</dt>
401 <dd class="option-type">Function</dd>
402
403 <dt class="option-default-label">Default:</dt>
404 <dd class="option-default">$.datepicker.iso8601Week</dd>
405
406 </dl>
407 </div>
408 <div class="option-description">
409 <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>
410 </div>
411 <div class="option-examples">
412 <h4>Code examples</h4>
413 <dl class="option-examples-list">
414
415<dt>
416 Initialize a datepicker with the <code>calculateWeek</code> option specified.
417</dt>
418<dd>
419<pre><code>$('.selector').datepicker({ calculateWeek: myWeekCalc });</code></pre>
420</dd>
421
422
423<dt>
424 Get or set the <code>calculateWeek</code> option, after init.
425</dt>
426<dd>
427<pre><code>//getter
428var calculateWeek = $('.selector').datepicker('option', 'calculateWeek');
429//setter
430$('.selector').datepicker('option', 'calculateWeek', myWeekCalc);</code></pre>
431</dd>
432
433 </dl>
434 </div>
435</li>
436
437
438<li class="option" id="option-changeMonth">
439 <div class="option-header">
440 <h3 class="option-name"><a href="#option-changeMonth">changeMonth</a></h3>
441 <dl>
442 <dt class="option-type-label">Type:</dt>
443 <dd class="option-type">Boolean</dd>
444
445 <dt class="option-default-label">Default:</dt>
446 <dd class="option-default">false</dd>
447
448 </dl>
449 </div>
450 <div class="option-description">
451 <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>
452 </div>
453 <div class="option-examples">
454 <h4>Code examples</h4>
455 <dl class="option-examples-list">
456
457<dt>
458 Initialize a datepicker with the <code>changeMonth</code> option specified.
459</dt>
460<dd>
461<pre><code>$('.selector').datepicker({ changeMonth: true });</code></pre>
462</dd>
463
464
465<dt>
466 Get or set the <code>changeMonth</code> option, after init.
467</dt>
468<dd>
469<pre><code>//getter
470var changeMonth = $('.selector').datepicker('option', 'changeMonth');
471//setter
472$('.selector').datepicker('option', 'changeMonth', true);</code></pre>
473</dd>
474
475 </dl>
476 </div>
477</li>
478
479
480<li class="option" id="option-changeYear">
481 <div class="option-header">
482 <h3 class="option-name"><a href="#option-changeYear">changeYear</a></h3>
483 <dl>
484 <dt class="option-type-label">Type:</dt>
485 <dd class="option-type">Boolean</dd>
486
487 <dt class="option-default-label">Default:</dt>
488 <dd class="option-default">false</dd>
489
490 </dl>
491 </div>
492 <div class="option-description">
493 <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.</p>
494 </div>
495 <div class="option-examples">
496 <h4>Code examples</h4>
497 <dl class="option-examples-list">
498
499<dt>
500 Initialize a datepicker with the <code>changeYear</code> option specified.
501</dt>
502<dd>
503<pre><code>$('.selector').datepicker({ changeYear: true });</code></pre>
504</dd>
505
506
507<dt>
508 Get or set the <code>changeYear</code> option, after init.
509</dt>
510<dd>
511<pre><code>//getter
512var changeYear = $('.selector').datepicker('option', 'changeYear');
513//setter
514$('.selector').datepicker('option', 'changeYear', true);</code></pre>
515</dd>
516
517 </dl>
518 </div>
519</li>
520
521
522<li class="option" id="option-closeText">
523 <div class="option-header">
524 <h3 class="option-name"><a href="#option-closeText">closeText</a></h3>
525 <dl>
526 <dt class="option-type-label">Type:</dt>
527 <dd class="option-type">String</dd>
528
529 <dt class="option-default-label">Default:</dt>
530 <dd class="option-default">'Done'</dd>
531
532 </dl>
533 </div>
534 <div class="option-description">
535 <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>
536 </div>
537 <div class="option-examples">
538 <h4>Code examples</h4>
539 <dl class="option-examples-list">
540
541<dt>
542 Initialize a datepicker with the <code>closeText</code> option specified.
543</dt>
544<dd>
545<pre><code>$('.selector').datepicker({ closeText: 'X' });</code></pre>
546</dd>
547
548
549<dt>
550 Get or set the <code>closeText</code> option, after init.
551</dt>
552<dd>
553<pre><code>//getter
554var closeText = $('.selector').datepicker('option', 'closeText');
555//setter
556$('.selector').datepicker('option', 'closeText', 'X');</code></pre>
557</dd>
558
559 </dl>
560 </div>
561</li>
562
563
564<li class="option" id="option-constrainInput">
565 <div class="option-header">
566 <h3 class="option-name"><a href="#option-constrainInput">constrainInput</a></h3>
567 <dl>
568 <dt class="option-type-label">Type:</dt>
569 <dd class="option-type">Boolean</dd>
570
571 <dt class="option-default-label">Default:</dt>
572 <dd class="option-default">true</dd>
573
574 </dl>
575 </div>
576 <div class="option-description">
577 <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>
578 </div>
579 <div class="option-examples">
580 <h4>Code examples</h4>
581 <dl class="option-examples-list">
582
583<dt>
584 Initialize a datepicker with the <code>constrainInput</code> option specified.
585</dt>
586<dd>
587<pre><code>$('.selector').datepicker({ constrainInput: false });</code></pre>
588</dd>
589
590
591<dt>
592 Get or set the <code>constrainInput</code> option, after init.
593</dt>
594<dd>
595<pre><code>//getter
596var constrainInput = $('.selector').datepicker('option', 'constrainInput');
597//setter
598$('.selector').datepicker('option', 'constrainInput', false);</code></pre>
599</dd>
600
601 </dl>
602 </div>
603</li>
604
605
606<li class="option" id="option-currentText">
607 <div class="option-header">
608 <h3 class="option-name"><a href="#option-currentText">currentText</a></h3>
609 <dl>
610 <dt class="option-type-label">Type:</dt>
611 <dd class="option-type">String</dd>
612
613 <dt class="option-default-label">Default:</dt>
614 <dd class="option-default">'Today'</dd>
615
616 </dl>
617 </div>
618 <div class="option-description">
619 <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>
620 </div>
621 <div class="option-examples">
622 <h4>Code examples</h4>
623 <dl class="option-examples-list">
624
625<dt>
626 Initialize a datepicker with the <code>currentText</code> option specified.
627</dt>
628<dd>
629<pre><code>$('.selector').datepicker({ currentText: 'Now' });</code></pre>
630</dd>
631
632
633<dt>
634 Get or set the <code>currentText</code> option, after init.
635</dt>
636<dd>
637<pre><code>//getter
638var currentText = $('.selector').datepicker('option', 'currentText');
639//setter
640$('.selector').datepicker('option', 'currentText', 'Now');</code></pre>
641</dd>
642
643 </dl>
644 </div>
645</li>
646
647
648<li class="option" id="option-dateFormat">
649 <div class="option-header">
650 <h3 class="option-name"><a href="#option-dateFormat">dateFormat</a></h3>
651 <dl>
652 <dt class="option-type-label">Type:</dt>
653 <dd class="option-type">String</dd>
654
655 <dt class="option-default-label">Default:</dt>
656 <dd class="option-default">'mm/dd/yy'</dd>
657
658 </dl>
659 </div>
660 <div class="option-description">
661 <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>
662 </div>
663 <div class="option-examples">
664 <h4>Code examples</h4>
665 <dl class="option-examples-list">
666
667<dt>
668 Initialize a datepicker with the <code>dateFormat</code> option specified.
669</dt>
670<dd>
671<pre><code>$('.selector').datepicker({ dateFormat: 'yy-mm-dd' });</code></pre>
672</dd>
673
674
675<dt>
676 Get or set the <code>dateFormat</code> option, after init.
677</dt>
678<dd>
679<pre><code>//getter
680var dateFormat = $('.selector').datepicker('option', 'dateFormat');
681//setter
682$('.selector').datepicker('option', 'dateFormat', 'yy-mm-dd');</code></pre>
683</dd>
684
685 </dl>
686 </div>
687</li>
688
689
690<li class="option" id="option-dayNames">
691 <div class="option-header">
692 <h3 class="option-name"><a href="#option-dayNames">dayNames</a></h3>
693 <dl>
694 <dt class="option-type-label">Type:</dt>
695 <dd class="option-type">Array</dd>
696
697 <dt class="option-default-label">Default:</dt>
698 <dd class="option-default">['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']</dd>
699
700 </dl>
701 </div>
702 <div class="option-description">
703 <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>
704 </div>
705 <div class="option-examples">
706 <h4>Code examples</h4>
707 <dl class="option-examples-list">
708
709<dt>
710 Initialize a datepicker with the <code>dayNames</code> option specified.
711</dt>
712<dd>
713<pre><code>$('.selector').datepicker({ dayNames: ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'] });</code></pre>
714</dd>
715
716
717<dt>
718 Get or set the <code>dayNames</code> option, after init.
719</dt>
720<dd>
721<pre><code>//getter
722var dayNames = $('.selector').datepicker('option', 'dayNames');
723//setter
724$('.selector').datepicker('option', 'dayNames', ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi']);</code></pre>
725</dd>
726
727 </dl>
728 </div>
729</li>
730
731
732<li class="option" id="option-dayNamesMin">
733 <div class="option-header">
734 <h3 class="option-name"><a href="#option-dayNamesMin">dayNamesMin</a></h3>
735 <dl>
736 <dt class="option-type-label">Type:</dt>
737 <dd class="option-type">Array</dd>
738
739 <dt class="option-default-label">Default:</dt>
740 <dd class="option-default">['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']</dd>
741
742 </dl>
743 </div>
744 <div class="option-description">
745 <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>
746 </div>
747 <div class="option-examples">
748 <h4>Code examples</h4>
749 <dl class="option-examples-list">
750
751<dt>
752 Initialize a datepicker with the <code>dayNamesMin</code> option specified.
753</dt>
754<dd>
755<pre><code>$('.selector').datepicker({ dayNamesMin: ['Di', 'Lu', 'Ma', 'Me', 'Je', 'Ve', 'Sa'] });</code></pre>
756</dd>
757
758
759<dt>
760 Get or set the <code>dayNamesMin</code> option, after init.
761</dt>
762<dd>
763<pre><code>//getter
764var dayNamesMin = $('.selector').datepicker('option', 'dayNamesMin');
765//setter
766$('.selector').datepicker('option', 'dayNamesMin', ['Di', 'Lu', 'Ma', 'Me', 'Je', 'Ve', 'Sa']);</code></pre>
767</dd>
768
769 </dl>
770 </div>
771</li>
772
773
774<li class="option" id="option-dayNamesShort">
775 <div class="option-header">
776 <h3 class="option-name"><a href="#option-dayNamesShort">dayNamesShort</a></h3>
777 <dl>
778 <dt class="option-type-label">Type:</dt>
779 <dd class="option-type">Array</dd>
780
781 <dt class="option-default-label">Default:</dt>
782 <dd class="option-default">['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']</dd>
783
784 </dl>
785 </div>
786 <div class="option-description">
787 <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>
788 </div>
789 <div class="option-examples">
790 <h4>Code examples</h4>
791 <dl class="option-examples-list">
792
793<dt>
794 Initialize a datepicker with the <code>dayNamesShort</code> option specified.
795</dt>
796<dd>
797<pre><code>$('.selector').datepicker({ dayNamesShort: ['Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam'] });</code></pre>
798</dd>
799
800
801<dt>
802 Get or set the <code>dayNamesShort</code> option, after init.
803</dt>
804<dd>
805<pre><code>//getter
806var dayNamesShort = $('.selector').datepicker('option', 'dayNamesShort');
807//setter
808$('.selector').datepicker('option', 'dayNamesShort', ['Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam']);</code></pre>
809</dd>
810
811 </dl>
812 </div>
813</li>
814
815
816<li class="option" id="option-defaultDate">
817 <div class="option-header">
818 <h3 class="option-name"><a href="#option-defaultDate">defaultDate</a></h3>
819 <dl>
820 <dt class="option-type-label">Type:</dt>
821 <dd class="option-type">Date, Number, String</dd>
822
823 <dt class="option-default-label">Default:</dt>
824 <dd class="option-default">null</dd>
825
826 </dl>
827 </div>
828 <div class="option-description">
829 <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>
830 </div>
831 <div class="option-examples">
832 <h4>Code examples</h4>
833 <dl class="option-examples-list">
834
835<dt>
836 Initialize a datepicker with the <code>defaultDate</code> option specified.
837</dt>
838<dd>
839<pre><code>$('.selector').datepicker({ defaultDate: +7 });</code></pre>
840</dd>
841
842
843<dt>
844 Get or set the <code>defaultDate</code> option, after init.
845</dt>
846<dd>
847<pre><code>//getter
848var defaultDate = $('.selector').datepicker('option', 'defaultDate');
849//setter
850$('.selector').datepicker('option', 'defaultDate', +7);</code></pre>
851</dd>
852
853 </dl>
854 </div>
855</li>
856
857
858<li class="option" id="option-duration">
859 <div class="option-header">
860 <h3 class="option-name"><a href="#option-duration">duration</a></h3>
861 <dl>
862 <dt class="option-type-label">Type:</dt>
863 <dd class="option-type">String, Number</dd>
864
865 <dt class="option-default-label">Default:</dt>
866 <dd class="option-default">'normal'</dd>
867
868 </dl>
869 </div>
870 <div class="option-description">
871 <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>
872 </div>
873 <div class="option-examples">
874 <h4>Code examples</h4>
875 <dl class="option-examples-list">
876
877<dt>
878 Initialize a datepicker with the <code>duration</code> option specified.
879</dt>
880<dd>
881<pre><code>$('.selector').datepicker({ duration: 'slow' });</code></pre>
882</dd>
883
884
885<dt>
886 Get or set the <code>duration</code> option, after init.
887</dt>
888<dd>
889<pre><code>//getter
890var duration = $('.selector').datepicker('option', 'duration');
891//setter
892$('.selector').datepicker('option', 'duration', 'slow');</code></pre>
893</dd>
894
895 </dl>
896 </div>
897</li>
898
899
900<li class="option" id="option-firstDay">
901 <div class="option-header">
902 <h3 class="option-name"><a href="#option-firstDay">firstDay</a></h3>
903 <dl>
904 <dt class="option-type-label">Type:</dt>
905 <dd class="option-type">Number</dd>
906
907 <dt class="option-default-label">Default:</dt>
908 <dd class="option-default">0</dd>
909
910 </dl>
911 </div>
912 <div class="option-description">
913 <p>Set the first day of the week: Sunday is 0, Monday is 1, ... This attribute is one of the regionalisation attributes.</p>
914 </div>
915 <div class="option-examples">
916 <h4>Code examples</h4>
917 <dl class="option-examples-list">
918
919<dt>
920 Initialize a datepicker with the <code>firstDay</code> option specified.
921</dt>
922<dd>
923<pre><code>$('.selector').datepicker({ firstDay: 1 });</code></pre>
924</dd>
925
926
927<dt>
928 Get or set the <code>firstDay</code> option, after init.
929</dt>
930<dd>
931<pre><code>//getter
932var firstDay = $('.selector').datepicker('option', 'firstDay');
933//setter
934$('.selector').datepicker('option', 'firstDay', 1);</code></pre>
935</dd>
936
937 </dl>
938 </div>
939</li>
940
941
942<li class="option" id="option-gotoCurrent">
943 <div class="option-header">
944 <h3 class="option-name"><a href="#option-gotoCurrent">gotoCurrent</a></h3>
945 <dl>
946 <dt class="option-type-label">Type:</dt>
947 <dd class="option-type">Boolean</dd>
948
949 <dt class="option-default-label">Default:</dt>
950 <dd class="option-default">false</dd>
951
952 </dl>
953 </div>
954 <div class="option-description">
955 <p>When true the current day link moves to the currently selected date instead of today.</p>
956 </div>
957 <div class="option-examples">
958 <h4>Code examples</h4>
959 <dl class="option-examples-list">
960
961<dt>
962 Initialize a datepicker with the <code>gotoCurrent</code> option specified.
963</dt>
964<dd>
965<pre><code>$('.selector').datepicker({ gotoCurrent: true });</code></pre>
966</dd>
967
968
969<dt>
970 Get or set the <code>gotoCurrent</code> option, after init.
971</dt>
972<dd>
973<pre><code>//getter
974var gotoCurrent = $('.selector').datepicker('option', 'gotoCurrent');
975//setter
976$('.selector').datepicker('option', 'gotoCurrent', true);</code></pre>
977</dd>
978
979 </dl>
980 </div>
981</li>
982
983
984<li class="option" id="option-hideIfNoPrevNext">
985 <div class="option-header">
986 <h3 class="option-name"><a href="#option-hideIfNoPrevNext">hideIfNoPrevNext</a></h3>
987 <dl>
988 <dt class="option-type-label">Type:</dt>
989 <dd class="option-type">Boolean</dd>
990
991 <dt class="option-default-label">Default:</dt>
992 <dd class="option-default">false</dd>
993
994 </dl>
995 </div>
996 <div class="option-description">
997 <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>
998 </div>
999 <div class="option-examples">
1000 <h4>Code examples</h4>
1001 <dl class="option-examples-list">
1002
1003<dt>
1004 Initialize a datepicker with the <code>hideIfNoPrevNext</code> option specified.
1005</dt>
1006<dd>
1007<pre><code>$('.selector').datepicker({ hideIfNoPrevNext: true });</code></pre>
1008</dd>
1009
1010
1011<dt>
1012 Get or set the <code>hideIfNoPrevNext</code> option, after init.
1013</dt>
1014<dd>
1015<pre><code>//getter
1016var hideIfNoPrevNext = $('.selector').datepicker('option', 'hideIfNoPrevNext');
1017//setter
1018$('.selector').datepicker('option', 'hideIfNoPrevNext', true);</code></pre>
1019</dd>
1020
1021 </dl>
1022 </div>
1023</li>
1024
1025
1026<li class="option" id="option-isRTL">
1027 <div class="option-header">
1028 <h3 class="option-name"><a href="#option-isRTL">isRTL</a></h3>
1029 <dl>
1030 <dt class="option-type-label">Type:</dt>
1031 <dd class="option-type">Boolean</dd>
1032
1033 <dt class="option-default-label">Default:</dt>
1034 <dd class="option-default">false</dd>
1035
1036 </dl>
1037 </div>
1038 <div class="option-description">
1039 <p>True if the current language is drawn from right to left. This attribute is one of the regionalisation attributes.</p>
1040 </div>
1041 <div class="option-examples">
1042 <h4>Code examples</h4>
1043 <dl class="option-examples-list">
1044
1045<dt>
1046 Initialize a datepicker with the <code>isRTL</code> option specified.
1047</dt>
1048<dd>
1049<pre><code>$('.selector').datepicker({ isRTL: true });</code></pre>
1050</dd>
1051
1052
1053<dt>
1054 Get or set the <code>isRTL</code> option, after init.
1055</dt>
1056<dd>
1057<pre><code>//getter
1058var isRTL = $('.selector').datepicker('option', 'isRTL');
1059//setter
1060$('.selector').datepicker('option', 'isRTL', true);</code></pre>
1061</dd>
1062
1063 </dl>
1064 </div>
1065</li>
1066
1067
1068<li class="option" id="option-maxDate">
1069 <div class="option-header">
1070 <h3 class="option-name"><a href="#option-maxDate">maxDate</a></h3>
1071 <dl>
1072 <dt class="option-type-label">Type:</dt>
1073 <dd class="option-type">Date, Number, String</dd>
1074
1075 <dt class="option-default-label">Default:</dt>
1076 <dd class="option-default">null</dd>
1077
1078 </dl>
1079 </div>
1080 <div class="option-description">
1081 <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>
1082 </div>
1083 <div class="option-examples">
1084 <h4>Code examples</h4>
1085 <dl class="option-examples-list">
1086
1087<dt>
1088 Initialize a datepicker with the <code>maxDate</code> option specified.
1089</dt>
1090<dd>
1091<pre><code>$('.selector').datepicker({ maxDate: '+1m +1w' });</code></pre>
1092</dd>
1093
1094
1095<dt>
1096 Get or set the <code>maxDate</code> option, after init.
1097</dt>
1098<dd>
1099<pre><code>//getter
1100var maxDate = $('.selector').datepicker('option', 'maxDate');
1101//setter
1102$('.selector').datepicker('option', 'maxDate', '+1m +1w');</code></pre>
1103</dd>
1104
1105 </dl>
1106 </div>
1107</li>
1108
1109
1110<li class="option" id="option-minDate">
1111 <div class="option-header">
1112 <h3 class="option-name"><a href="#option-minDate">minDate</a></h3>
1113 <dl>
1114 <dt class="option-type-label">Type:</dt>
1115 <dd class="option-type">Date, Number, String</dd>
1116
1117 <dt class="option-default-label">Default:</dt>
1118 <dd class="option-default">null</dd>
1119
1120 </dl>
1121 </div>
1122 <div class="option-description">
1123 <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>
1124 </div>
1125 <div class="option-examples">
1126 <h4>Code examples</h4>
1127 <dl class="option-examples-list">
1128
1129<dt>
1130 Initialize a datepicker with the <code>minDate</code> option specified.
1131</dt>
1132<dd>
1133<pre><code>$('.selector').datepicker({ minDate: new Date(2007, 1 - 1, 1) });</code></pre>
1134</dd>
1135
1136
1137<dt>
1138 Get or set the <code>minDate</code> option, after init.
1139</dt>
1140<dd>
1141<pre><code>//getter
1142var minDate = $('.selector').datepicker('option', 'minDate');
1143//setter
1144$('.selector').datepicker('option', 'minDate', new Date(2007, 1 - 1, 1));</code></pre>
1145</dd>
1146
1147 </dl>
1148 </div>
1149</li>
1150
1151
1152<li class="option" id="option-monthNames">
1153 <div class="option-header">
1154 <h3 class="option-name"><a href="#option-monthNames">monthNames</a></h3>
1155 <dl>
1156 <dt class="option-type-label">Type:</dt>
1157 <dd class="option-type">Array</dd>
1158
1159 <dt class="option-default-label">Default:</dt>
1160 <dd class="option-default">['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']</dd>
1161
1162 </dl>
1163 </div>
1164 <div class="option-description">
1165 <p>The list of full 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>
1166 </div>
1167 <div class="option-examples">
1168 <h4>Code examples</h4>
1169 <dl class="option-examples-list">
1170
1171<dt>
1172 Initialize a datepicker with the <code>monthNames</code> option specified.
1173</dt>
1174<dd>
1175<pre><code>$('.selector').datepicker({ monthNames: ['Januar','Februar','Marts','April','Maj','Juni','Juli','August','September','Oktober','November','December'] });</code></pre>
1176</dd>
1177
1178
1179<dt>
1180 Get or set the <code>monthNames</code> option, after init.
1181</dt>
1182<dd>
1183<pre><code>//getter
1184var monthNames = $('.selector').datepicker('option', 'monthNames');
1185//setter
1186$('.selector').datepicker('option', 'monthNames', ['Januar','Februar','Marts','April','Maj','Juni','Juli','August','September','Oktober','November','December']);</code></pre>
1187</dd>
1188
1189 </dl>
1190 </div>
1191</li>
1192
1193
1194<li class="option" id="option-monthNamesShort">
1195 <div class="option-header">
1196 <h3 class="option-name"><a href="#option-monthNamesShort">monthNamesShort</a></h3>
1197 <dl>
1198 <dt class="option-type-label">Type:</dt>
1199 <dd class="option-type">Array</dd>
1200
1201 <dt class="option-default-label">Default:</dt>
1202 <dd class="option-default">['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']</dd>
1203
1204 </dl>
1205 </div>
1206 <div class="option-description">
1207 <p>The list of abbreviated 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>
1208 </div>
1209 <div class="option-examples">
1210 <h4>Code examples</h4>
1211 <dl class="option-examples-list">
1212
1213<dt>
1214 Initialize a datepicker with the <code>monthNamesShort</code> option specified.
1215</dt>
1216<dd>
1217<pre><code>$('.selector').datepicker({ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun','Jul','Aug','Sep','Okt','Nov','Dec'] });</code></pre>
1218</dd>
1219
1220
1221<dt>
1222 Get or set the <code>monthNamesShort</code> option, after init.
1223</dt>
1224<dd>
1225<pre><code>//getter
1226var monthNamesShort = $('.selector').datepicker('option', 'monthNamesShort');
1227//setter
1228$('.selector').datepicker('option', 'monthNamesShort', ['Jan','Feb','Mar','Apr','Maj','Jun','Jul','Aug','Sep','Okt','Nov','Dec']);</code></pre>
1229</dd>
1230
1231 </dl>
1232 </div>
1233</li>
1234
1235
1236<li class="option" id="option-navigationAsDateFormat">
1237 <div class="option-header">
1238 <h3 class="option-name"><a href="#option-navigationAsDateFormat">navigationAsDateFormat</a></h3>
1239 <dl>
1240 <dt class="option-type-label">Type:</dt>
1241 <dd class="option-type">Boolean</dd>
1242
1243 <dt class="option-default-label">Default:</dt>
1244 <dd class="option-default">false</dd>
1245
1246 </dl>
1247 </div>
1248 <div class="option-description">
1249 <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>
1250 </div>
1251 <div class="option-examples">
1252 <h4>Code examples</h4>
1253 <dl class="option-examples-list">
1254
1255<dt>
1256 Initialize a datepicker with the <code>navigationAsDateFormat</code> option specified.
1257</dt>
1258<dd>
1259<pre><code>$('.selector').datepicker({ navigationAsDateFormat: true });</code></pre>
1260</dd>
1261
1262
1263<dt>
1264 Get or set the <code>navigationAsDateFormat</code> option, after init.
1265</dt>
1266<dd>
1267<pre><code>//getter
1268var navigationAsDateFormat = $('.selector').datepicker('option', 'navigationAsDateFormat');
1269//setter
1270$('.selector').datepicker('option', 'navigationAsDateFormat', true);</code></pre>
1271</dd>
1272
1273 </dl>
1274 </div>
1275</li>
1276
1277
1278<li class="option" id="option-nextText">
1279 <div class="option-header">
1280 <h3 class="option-name"><a href="#option-nextText">nextText</a></h3>
1281 <dl>
1282 <dt class="option-type-label">Type:</dt>
1283 <dd class="option-type">String</dd>
1284
1285 <dt class="option-default-label">Default:</dt>
1286 <dd class="option-default">'Next'</dd>
1287
1288 </dl>
1289 </div>
1290 <div class="option-description">
1291 <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>
1292 </div>
1293 <div class="option-examples">
1294 <h4>Code examples</h4>
1295 <dl class="option-examples-list">
1296
1297<dt>
1298 Initialize a datepicker with the <code>nextText</code> option specified.
1299</dt>
1300<dd>
1301<pre><code>$('.selector').datepicker({ nextText: 'Later' });</code></pre>
1302</dd>
1303
1304
1305<dt>
1306 Get or set the <code>nextText</code> option, after init.
1307</dt>
1308<dd>
1309<pre><code>//getter
1310var nextText = $('.selector').datepicker('option', 'nextText');
1311//setter
1312$('.selector').datepicker('option', 'nextText', 'Later');</code></pre>
1313</dd>
1314
1315 </dl>
1316 </div>
1317</li>
1318
1319
1320<li class="option" id="option-numberOfMonths">
1321 <div class="option-header">
1322 <h3 class="option-name"><a href="#option-numberOfMonths">numberOfMonths</a></h3>
1323 <dl>
1324 <dt class="option-type-label">Type:</dt>
1325 <dd class="option-type">Number, Array</dd>
1326
1327 <dt class="option-default-label">Default:</dt>
1328 <dd class="option-default">1</dd>
1329
1330 </dl>
1331 </div>
1332 <div class="option-description">
1333 <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>
1334 </div>
1335 <div class="option-examples">
1336 <h4>Code examples</h4>
1337 <dl class="option-examples-list">
1338
1339<dt>
1340 Initialize a datepicker with the <code>numberOfMonths</code> option specified.
1341</dt>
1342<dd>
1343<pre><code>$('.selector').datepicker({ numberOfMonths: [2, 3] });</code></pre>
1344</dd>
1345
1346
1347<dt>
1348 Get or set the <code>numberOfMonths</code> option, after init.
1349</dt>
1350<dd>
1351<pre><code>//getter
1352var numberOfMonths = $('.selector').datepicker('option', 'numberOfMonths');
1353//setter
1354$('.selector').datepicker('option', 'numberOfMonths', [2, 3]);</code></pre>
1355</dd>
1356
1357 </dl>
1358 </div>
1359</li>
1360
1361
1362<li class="option" id="option-prevText">
1363 <div class="option-header">
1364 <h3 class="option-name"><a href="#option-prevText">prevText</a></h3>
1365 <dl>
1366 <dt class="option-type-label">Type:</dt>
1367 <dd class="option-type">String</dd>
1368
1369 <dt class="option-default-label">Default:</dt>
1370 <dd class="option-default">'Prev'</dd>
1371
1372 </dl>
1373 </div>
1374 <div class="option-description">
1375 <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>
1376 </div>
1377 <div class="option-examples">
1378 <h4>Code examples</h4>
1379 <dl class="option-examples-list">
1380
1381<dt>
1382 Initialize a datepicker with the <code>prevText</code> option specified.
1383</dt>
1384<dd>
1385<pre><code>$('.selector').datepicker({ prevText: 'Earlier' });</code></pre>
1386</dd>
1387
1388
1389<dt>
1390 Get or set the <code>prevText</code> option, after init.
1391</dt>
1392<dd>
1393<pre><code>//getter
1394var prevText = $('.selector').datepicker('option', 'prevText');
1395//setter
1396$('.selector').datepicker('option', 'prevText', 'Earlier');</code></pre>
1397</dd>
1398
1399 </dl>
1400 </div>
1401</li>
1402
1403
1404<li class="option" id="option-selectOtherMonths">
1405 <div class="option-header">
1406 <h3 class="option-name"><a href="#option-selectOtherMonths">selectOtherMonths</a></h3>
1407 <dl>
1408 <dt class="option-type-label">Type:</dt>
1409 <dd class="option-type">Boolean</dd>
1410
1411 <dt class="option-default-label">Default:</dt>
1412 <dd class="option-default">false</dd>
1413
1414 </dl>
1415 </div>
1416 <div class="option-description">
1417 <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>
1418 </div>
1419 <div class="option-examples">
1420 <h4>Code examples</h4>
1421 <dl class="option-examples-list">
1422
1423<dt>
1424 Initialize a datepicker with the <code>selectOtherMonths</code> option specified.
1425</dt>
1426<dd>
1427<pre><code>$('.selector').datepicker({ selectOtherMonths: true });</code></pre>
1428</dd>
1429
1430
1431<dt>
1432 Get or set the <code>selectOtherMonths</code> option, after init.
1433</dt>
1434<dd>
1435<pre><code>//getter
1436var selectOtherMonths = $('.selector').datepicker('option', 'selectOtherMonths');
1437//setter
1438$('.selector').datepicker('option', 'selectOtherMonths', true);</code></pre>
1439</dd>
1440
1441 </dl>
1442 </div>
1443</li>
1444
1445
1446<li class="option" id="option-shortYearCutoff">
1447 <div class="option-header">
1448 <h3 class="option-name"><a href="#option-shortYearCutoff">shortYearCutoff</a></h3>
1449 <dl>
1450 <dt class="option-type-label">Type:</dt>
1451 <dd class="option-type">String, Number</dd>
1452
1453 <dt class="option-default-label">Default:</dt>
1454 <dd class="option-default">'+10'</dd>
1455
1456 </dl>
1457 </div>
1458 <div class="option-description">
1459 <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>
1460 </div>
1461 <div class="option-examples">
1462 <h4>Code examples</h4>
1463 <dl class="option-examples-list">
1464
1465<dt>
1466 Initialize a datepicker with the <code>shortYearCutoff</code> option specified.
1467</dt>
1468<dd>
1469<pre><code>$('.selector').datepicker({ shortYearCutoff: 50 });</code></pre>
1470</dd>
1471
1472
1473<dt>
1474 Get or set the <code>shortYearCutoff</code> option, after init.
1475</dt>
1476<dd>
1477<pre><code>//getter
1478var shortYearCutoff = $('.selector').datepicker('option', 'shortYearCutoff');
1479//setter
1480$('.selector').datepicker('option', 'shortYearCutoff', 50);</code></pre>
1481</dd>
1482
1483 </dl>
1484 </div>
1485</li>
1486
1487
1488<li class="option" id="option-showAnim">
1489 <div class="option-header">
1490 <h3 class="option-name"><a href="#option-showAnim">showAnim</a></h3>
1491 <dl>
1492 <dt class="option-type-label">Type:</dt>
1493 <dd class="option-type">String</dd>
1494
1495 <dt class="option-default-label">Default:</dt>
1496 <dd class="option-default">'show'</dd>
1497
1498 </dl>
1499 </div>
1500 <div class="option-description">
1501 <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>
1502 </div>
1503 <div class="option-examples">
1504 <h4>Code examples</h4>
1505 <dl class="option-examples-list">
1506
1507<dt>
1508 Initialize a datepicker with the <code>showAnim</code> option specified.
1509</dt>
1510<dd>
1511<pre><code>$('.selector').datepicker({ showAnim: 'fold' });</code></pre>
1512</dd>
1513
1514
1515<dt>
1516 Get or set the <code>showAnim</code> option, after init.
1517</dt>
1518<dd>
1519<pre><code>//getter
1520var showAnim = $('.selector').datepicker('option', 'showAnim');
1521//setter
1522$('.selector').datepicker('option', 'showAnim', 'fold');</code></pre>
1523</dd>
1524
1525 </dl>
1526 </div>
1527</li>
1528
1529
1530<li class="option" id="option-showButtonPanel">
1531 <div class="option-header">
1532 <h3 class="option-name"><a href="#option-showButtonPanel">showButtonPanel</a></h3>
1533 <dl>
1534 <dt class="option-type-label">Type:</dt>
1535 <dd class="option-type">Boolean</dd>
1536
1537 <dt class="option-default-label">Default:</dt>
1538 <dd class="option-default">false</dd>
1539
1540 </dl>
1541 </div>
1542 <div class="option-description">
1543 <p>Whether to show the button panel.</p>
1544 </div>
1545 <div class="option-examples">
1546 <h4>Code examples</h4>
1547 <dl class="option-examples-list">
1548
1549<dt>
1550 Initialize a datepicker with the <code>showButtonPanel</code> option specified.
1551</dt>
1552<dd>
1553<pre><code>$('.selector').datepicker({ showButtonPanel: true });</code></pre>
1554</dd>
1555
1556
1557<dt>
1558 Get or set the <code>showButtonPanel</code> option, after init.
1559</dt>
1560<dd>
1561<pre><code>//getter
1562var showButtonPanel = $('.selector').datepicker('option', 'showButtonPanel');
1563//setter
1564$('.selector').datepicker('option', 'showButtonPanel', true);</code></pre>
1565</dd>
1566
1567 </dl>
1568 </div>
1569</li>
1570
1571
1572<li class="option" id="option-showCurrentAtPos">
1573 <div class="option-header">
1574 <h3 class="option-name"><a href="#option-showCurrentAtPos">showCurrentAtPos</a></h3>
1575 <dl>
1576 <dt class="option-type-label">Type:</dt>
1577 <dd class="option-type">Number</dd>
1578
1579 <dt class="option-default-label">Default:</dt>
1580 <dd class="option-default">0</dd>
1581
1582 </dl>
1583 </div>
1584 <div class="option-description">
1585 <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>
1586 </div>
1587 <div class="option-examples">
1588 <h4>Code examples</h4>
1589 <dl class="option-examples-list">
1590
1591<dt>
1592 Initialize a datepicker with the <code>showCurrentAtPos</code> option specified.
1593</dt>
1594<dd>
1595<pre><code>$('.selector').datepicker({ showCurrentAtPos: 3 });</code></pre>
1596</dd>
1597
1598
1599<dt>
1600 Get or set the <code>showCurrentAtPos</code> option, after init.
1601</dt>
1602<dd>
1603<pre><code>//getter
1604var showCurrentAtPos = $('.selector').datepicker('option', 'showCurrentAtPos');
1605//setter
1606$('.selector').datepicker('option', 'showCurrentAtPos', 3);</code></pre>
1607</dd>
1608
1609 </dl>
1610 </div>
1611</li>
1612
1613
1614<li class="option" id="option-showMonthAfterYear">
1615 <div class="option-header">
1616 <h3 class="option-name"><a href="#option-showMonthAfterYear">showMonthAfterYear</a></h3>
1617 <dl>
1618 <dt class="option-type-label">Type:</dt>
1619 <dd class="option-type">Boolean</dd>
1620
1621 <dt class="option-default-label">Default:</dt>
1622 <dd class="option-default">false</dd>
1623
1624 </dl>
1625 </div>
1626 <div class="option-description">
1627 <p>Whether to show the month after the year in the header.</p>
1628 </div>
1629 <div class="option-examples">
1630 <h4>Code examples</h4>
1631 <dl class="option-examples-list">
1632
1633<dt>
1634 Initialize a datepicker with the <code>showMonthAfterYear</code> option specified.
1635</dt>
1636<dd>
1637<pre><code>$('.selector').datepicker({ showMonthAfterYear: true });</code></pre>
1638</dd>
1639
1640
1641<dt>
1642 Get or set the <code>showMonthAfterYear</code> option, after init.
1643</dt>
1644<dd>
1645<pre><code>//getter
1646var showMonthAfterYear = $('.selector').datepicker('option', 'showMonthAfterYear');
1647//setter
1648$('.selector').datepicker('option', 'showMonthAfterYear', true);</code></pre>
1649</dd>
1650
1651 </dl>
1652 </div>
1653</li>
1654
1655
1656<li class="option" id="option-showOn">
1657 <div class="option-header">
1658 <h3 class="option-name"><a href="#option-showOn">showOn</a></h3>
1659 <dl>
1660 <dt class="option-type-label">Type:</dt>
1661 <dd class="option-type">String</dd>
1662
1663 <dt class="option-default-label">Default:</dt>
1664 <dd class="option-default">'focus'</dd>
1665
1666 </dl>
1667 </div>
1668 <div class="option-description">
1669 <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>
1670 </div>
1671 <div class="option-examples">
1672 <h4>Code examples</h4>
1673 <dl class="option-examples-list">
1674
1675<dt>
1676 Initialize a datepicker with the <code>showOn</code> option specified.
1677</dt>
1678<dd>
1679<pre><code>$('.selector').datepicker({ showOn: 'both' });</code></pre>
1680</dd>
1681
1682
1683<dt>
1684 Get or set the <code>showOn</code> option, after init.
1685</dt>
1686<dd>
1687<pre><code>//getter
1688var showOn = $('.selector').datepicker('option', 'showOn');
1689//setter
1690$('.selector').datepicker('option', 'showOn', 'both');</code></pre>
1691</dd>
1692
1693 </dl>
1694 </div>
1695</li>
1696
1697
1698<li class="option" id="option-showOptions">
1699 <div class="option-header">
1700 <h3 class="option-name"><a href="#option-showOptions">showOptions</a></h3>
1701 <dl>
1702 <dt class="option-type-label">Type:</dt>
1703 <dd class="option-type">Options</dd>
1704
1705 <dt class="option-default-label">Default:</dt>
1706 <dd class="option-default">{}</dd>
1707
1708 </dl>
1709 </div>
1710 <div class="option-description">
1711 <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>
1712 </div>
1713 <div class="option-examples">
1714 <h4>Code examples</h4>
1715 <dl class="option-examples-list">
1716
1717<dt>
1718 Initialize a datepicker with the <code>showOptions</code> option specified.
1719</dt>
1720<dd>
1721<pre><code>$('.selector').datepicker({ showOptions: {direction: 'up' });</code></pre>
1722</dd>
1723
1724
1725<dt>
1726 Get or set the <code>showOptions</code> option, after init.
1727</dt>
1728<dd>
1729<pre><code>//getter
1730var showOptions = $('.selector').datepicker('option', 'showOptions');
1731//setter
1732$('.selector').datepicker('option', 'showOptions', {direction: 'up');</code></pre>
1733</dd>
1734
1735 </dl>
1736 </div>
1737</li>
1738
1739
1740<li class="option" id="option-showOtherMonths">
1741 <div class="option-header">
1742 <h3 class="option-name"><a href="#option-showOtherMonths">showOtherMonths</a></h3>
1743 <dl>
1744 <dt class="option-type-label">Type:</dt>
1745 <dd class="option-type">Boolean</dd>
1746
1747 <dt class="option-default-label">Default:</dt>
1748 <dd class="option-default">false</dd>
1749
1750 </dl>
1751 </div>
1752 <div class="option-description">
1753 <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>
1754 </div>
1755 <div class="option-examples">
1756 <h4>Code examples</h4>
1757 <dl class="option-examples-list">
1758
1759<dt>
1760 Initialize a datepicker with the <code>showOtherMonths</code> option specified.
1761</dt>
1762<dd>
1763<pre><code>$('.selector').datepicker({ showOtherMonths: true });</code></pre>
1764</dd>
1765
1766
1767<dt>
1768 Get or set the <code>showOtherMonths</code> option, after init.
1769</dt>
1770<dd>
1771<pre><code>//getter
1772var showOtherMonths = $('.selector').datepicker('option', 'showOtherMonths');
1773//setter
1774$('.selector').datepicker('option', 'showOtherMonths', true);</code></pre>
1775</dd>
1776
1777 </dl>
1778 </div>
1779</li>
1780
1781
1782<li class="option" id="option-showWeek">
1783 <div class="option-header">
1784 <h3 class="option-name"><a href="#option-showWeek">showWeek</a></h3>
1785 <dl>
1786 <dt class="option-type-label">Type:</dt>
1787 <dd class="option-type">Boolean</dd>
1788
1789 <dt class="option-default-label">Default:</dt>
1790 <dd class="option-default">false</dd>
1791
1792 </dl>
1793 </div>
1794 <div class="option-description">
1795 <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>firstDay</code> option.</p>
1796 </div>
1797 <div class="option-examples">
1798 <h4>Code examples</h4>
1799 <dl class="option-examples-list">
1800
1801<dt>
1802 Initialize a datepicker with the <code>showWeek</code> option specified.
1803</dt>
1804<dd>
1805<pre><code>$('.selector').datepicker({ showWeek: true });</code></pre>
1806</dd>
1807
1808
1809<dt>
1810 Get or set the <code>showWeek</code> option, after init.
1811</dt>
1812<dd>
1813<pre><code>//getter
1814var showWeek = $('.selector').datepicker('option', 'showWeek');
1815//setter
1816$('.selector').datepicker('option', 'showWeek', true);</code></pre>
1817</dd>
1818
1819 </dl>
1820 </div>
1821</li>
1822
1823
1824<li class="option" id="option-stepMonths">
1825 <div class="option-header">
1826 <h3 class="option-name"><a href="#option-stepMonths">stepMonths</a></h3>
1827 <dl>
1828 <dt class="option-type-label">Type:</dt>
1829 <dd class="option-type">Number</dd>
1830
1831 <dt class="option-default-label">Default:</dt>
1832 <dd class="option-default">1</dd>
1833
1834 </dl>
1835 </div>
1836 <div class="option-description">
1837 <p>Set how many months to move when clicking the Previous/Next links.</p>
1838 </div>
1839 <div class="option-examples">
1840 <h4>Code examples</h4>
1841 <dl class="option-examples-list">
1842
1843<dt>
1844 Initialize a datepicker with the <code>stepMonths</code> option specified.
1845</dt>
1846<dd>
1847<pre><code>$('.selector').datepicker({ stepMonths: 3 });</code></pre>
1848</dd>
1849
1850
1851<dt>
1852 Get or set the <code>stepMonths</code> option, after init.
1853</dt>
1854<dd>
1855<pre><code>//getter
1856var stepMonths = $('.selector').datepicker('option', 'stepMonths');
1857//setter
1858$('.selector').datepicker('option', 'stepMonths', 3);</code></pre>
1859</dd>
1860
1861 </dl>
1862 </div>
1863</li>
1864
1865
1866<li class="option" id="option-weekHeader">
1867 <div class="option-header">
1868 <h3 class="option-name"><a href="#option-weekHeader">weekHeader</a></h3>
1869 <dl>
1870 <dt class="option-type-label">Type:</dt>
1871 <dd class="option-type">String</dd>
1872
1873 <dt class="option-default-label">Default:</dt>
1874 <dd class="option-default">'Wk'</dd>
1875
1876 </dl>
1877 </div>
1878 <div class="option-description">
1879 <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>
1880 </div>
1881 <div class="option-examples">
1882 <h4>Code examples</h4>
1883 <dl class="option-examples-list">
1884
1885<dt>
1886 Initialize a datepicker with the <code>weekHeader</code> option specified.
1887</dt>
1888<dd>
1889<pre><code>$('.selector').datepicker({ weekHeader: 'W' });</code></pre>
1890</dd>
1891
1892
1893<dt>
1894 Get or set the <code>weekHeader</code> option, after init.
1895</dt>
1896<dd>
1897<pre><code>//getter
1898var weekHeader = $('.selector').datepicker('option', 'weekHeader');
1899//setter
1900$('.selector').datepicker('option', 'weekHeader', 'W');</code></pre>
1901</dd>
1902
1903 </dl>
1904 </div>
1905</li>
1906
1907
1908<li class="option" id="option-yearRange">
1909 <div class="option-header">
1910 <h3 class="option-name"><a href="#option-yearRange">yearRange</a></h3>
1911 <dl>
1912 <dt class="option-type-label">Type:</dt>
1913 <dd class="option-type">String</dd>
1914
1915 <dt class="option-default-label">Default:</dt>
1916 <dd class="option-default">'c-10:c+10'</dd>
1917
1918 </dl>
1919 </div>
1920 <div class="option-description">
1921 <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).</p>
1922 </div>
1923 <div class="option-examples">
1924 <h4>Code examples</h4>
1925 <dl class="option-examples-list">
1926
1927<dt>
1928 Initialize a datepicker with the <code>yearRange</code> option specified.
1929</dt>
1930<dd>
1931<pre><code>$('.selector').datepicker({ yearRange: '2000:2010' });</code></pre>
1932</dd>
1933
1934
1935<dt>
1936 Get or set the <code>yearRange</code> option, after init.
1937</dt>
1938<dd>
1939<pre><code>//getter
1940var yearRange = $('.selector').datepicker('option', 'yearRange');
1941//setter
1942$('.selector').datepicker('option', 'yearRange', '2000:2010');</code></pre>
1943</dd>
1944
1945 </dl>
1946 </div>
1947</li>
1948
1949
1950<li class="option" id="option-yearSuffix">
1951 <div class="option-header">
1952 <h3 class="option-name"><a href="#option-yearSuffix">yearSuffix</a></h3>
1953 <dl>
1954 <dt class="option-type-label">Type:</dt>
1955 <dd class="option-type">String</dd>
1956
1957 <dt class="option-default-label">Default:</dt>
1958 <dd class="option-default">''</dd>
1959
1960 </dl>
1961 </div>
1962 <div class="option-description">
1963 <p>Additional text to display after the year in the month headers. This attribute is one of the regionalisation attributes.</p>
1964 </div>
1965 <div class="option-examples">
1966 <h4>Code examples</h4>
1967 <dl class="option-examples-list">
1968
1969<dt>
1970 Initialize a datepicker with the <code>yearSuffix</code> option specified.
1971</dt>
1972<dd>
1973<pre><code>$('.selector').datepicker({ yearSuffix: 'CE' });</code></pre>
1974</dd>
1975
1976
1977<dt>
1978 Get or set the <code>yearSuffix</code> option, after init.
1979</dt>
1980<dd>
1981<pre><code>//getter
1982var yearSuffix = $('.selector').datepicker('option', 'yearSuffix');
1983//setter
1984$('.selector').datepicker('option', 'yearSuffix', 'CE');</code></pre>
1985</dd>
1986
1987 </dl>
1988 </div>
1989</li>
1990
1991 </ul>
1992 </div>
1993 <div id="events">
1994 <h2 class="top-header">Events</h2>
1995 <ul class="events-list">
1996
1997<li class="event" id="event-beforeShow">
1998 <div class="event-header">
1999 <h3 class="event-name"><a href="#event-beforeShow">beforeShow</a></h3>
2000 <dl>
2001 <dt class="event-type-label"></dt>
2002 <dd class="event-type">function(input, inst)</dd>
2003 </dl>
2004 </div>
2005 <div class="event-description">
2006 <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>
2007 </div>
2008 <div class="event-examples">
2009 <h4>Code examples</h4>
2010 <dl class="event-examples-list">
2011
2012<dt>
2013 Supply a callback function to handle the <code>beforeShow</code> event as an init option.
2014</dt>
2015<dd>
2016<pre><code>$('.selector').datepicker({
2017 beforeShow: function(input, inst) { ... }
2018});</code></pre>
2019</dd>
2020
2021 </dl>
2022 </div>
2023</li>
2024
2025
2026<li class="event" id="event-beforeShowDay">
2027 <div class="event-header">
2028 <h3 class="event-name"><a href="#event-beforeShowDay">beforeShowDay</a></h3>
2029 <dl>
2030 <dt class="event-type-label"></dt>
2031 <dd class="event-type">function(date)</dd>
2032 </dl>
2033 </div>
2034 <div class="event-description">
2035 <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>
2036 </div>
2037 <div class="event-examples">
2038 <h4>Code examples</h4>
2039 <dl class="event-examples-list">
2040
2041<dt>
2042 Supply a callback function to handle the <code>beforeShowDay</code> event as an init option.
2043</dt>
2044<dd>
2045<pre><code>$('.selector').datepicker({
2046 beforeShowDay: function(date) { ... }
2047});</code></pre>
2048</dd>
2049
2050 </dl>
2051 </div>
2052</li>
2053
2054
2055<li class="event" id="event-onChangeMonthYear">
2056 <div class="event-header">
2057 <h3 class="event-name"><a href="#event-onChangeMonthYear">onChangeMonthYear</a></h3>
2058 <dl>
2059 <dt class="event-type-label"></dt>
2060 <dd class="event-type">function(year, month, inst)</dd>
2061 </dl>
2062 </div>
2063 <div class="event-description">
2064 <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>
2065 </div>
2066 <div class="event-examples">
2067 <h4>Code examples</h4>
2068 <dl class="event-examples-list">
2069
2070<dt>
2071 Supply a callback function to handle the <code>onChangeMonthYear</code> event as an init option.
2072</dt>
2073<dd>
2074<pre><code>$('.selector').datepicker({
2075 onChangeMonthYear: function(year, month, inst) { ... }
2076});</code></pre>
2077</dd>
2078
2079 </dl>
2080 </div>
2081</li>
2082
2083
2084<li class="event" id="event-onClose">
2085 <div class="event-header">
2086 <h3 class="event-name"><a href="#event-onClose">onClose</a></h3>
2087 <dl>
2088 <dt class="event-type-label"></dt>
2089 <dd class="event-type">function(dateText, inst)</dd>
2090 </dl>
2091 </div>
2092 <div class="event-description">
2093 <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>
2094 </div>
2095 <div class="event-examples">
2096 <h4>Code examples</h4>
2097 <dl class="event-examples-list">
2098
2099<dt>
2100 Supply a callback function to handle the <code>onClose</code> event as an init option.
2101</dt>
2102<dd>
2103<pre><code>$('.selector').datepicker({
2104 onClose: function(dateText, inst) { ... }
2105});</code></pre>
2106</dd>
2107
2108 </dl>
2109 </div>
2110</li>
2111
2112
2113<li class="event" id="event-onSelect">
2114 <div class="event-header">
2115 <h3 class="event-name"><a href="#event-onSelect">onSelect</a></h3>
2116 <dl>
2117 <dt class="event-type-label"></dt>
2118 <dd class="event-type">function(dateText, inst)</dd>
2119 </dl>
2120 </div>
2121 <div class="event-description">
2122 <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>
2123 </div>
2124 <div class="event-examples">
2125 <h4>Code examples</h4>
2126 <dl class="event-examples-list">
2127
2128<dt>
2129 Supply a callback function to handle the <code>onSelect</code> event as an init option.
2130</dt>
2131<dd>
2132<pre><code>$('.selector').datepicker({
2133 onSelect: function(dateText, inst) { ... }
2134});</code></pre>
2135</dd>
2136
2137 </dl>
2138 </div>
2139</li>
2140
2141 </ul>
2142 </div>
2143 <div id="methods">
2144 <h2 class="top-header">Methods</h2>
2145 <ul class="methods-list">
2146
2147<li class="method" id="method-destroy">
2148 <div class="method-header">
2149 <h3 class="method-name"><a href="#method-destroy">destroy</a></h3>
2150 <dl>
2151 <dt class="method-signature-label">Signature:</dt>
2152 <dd class="method-signature">.datepicker( 'destroy'
2153
2154
2155
2156
2157
2158
2159
2160)</dd>
2161 </dl>
2162 </div>
2163 <div class="method-description">
2164 <p>Remove the datepicker functionality completely. This will return the element back to its pre-init state.</p>
2165 </div>
2166</li>
2167
2168
2169<li class="method" id="method-disable">
2170 <div class="method-header">
2171 <h3 class="method-name"><a href="#method-disable">disable</a></h3>
2172 <dl>
2173 <dt class="method-signature-label">Signature:</dt>
2174 <dd class="method-signature">.datepicker( 'disable'
2175
2176
2177
2178
2179
2180
2181
2182)</dd>
2183 </dl>
2184 </div>
2185 <div class="method-description">
2186 <p>Disable the datepicker.</p>
2187 </div>
2188</li>
2189
2190
2191<li class="method" id="method-enable">
2192 <div class="method-header">
2193 <h3 class="method-name"><a href="#method-enable">enable</a></h3>
2194 <dl>
2195 <dt class="method-signature-label">Signature:</dt>
2196 <dd class="method-signature">.datepicker( 'enable'
2197
2198
2199
2200
2201
2202
2203
2204)</dd>
2205 </dl>
2206 </div>
2207 <div class="method-description">
2208 <p>Enable the datepicker.</p>
2209 </div>
2210</li>
2211
2212
2213<li class="method" id="method-option">
2214 <div class="method-header">
2215 <h3 class="method-name"><a href="#method-option">option</a></h3>
2216 <dl>
2217 <dt class="method-signature-label">Signature:</dt>
2218 <dd class="method-signature">.datepicker( 'option'
2219
2220, optionName
2221
2222, <span class="optional">[</span>value<span class="optional">] </span>
2223
2224
2225
2226)</dd>
2227 </dl>
2228 </div>
2229 <div class="method-description">
2230 <p>Get or set any datepicker option. If no value is specified, will act as a getter.</p>
2231 </div>
2232</li>
2233
2234
2235<li class="method" id="method-dialog">
2236 <div class="method-header">
2237 <h3 class="method-name"><a href="#method-dialog">dialog</a></h3>
2238 <dl>
2239 <dt class="method-signature-label">Signature:</dt>
2240 <dd class="method-signature">.datepicker( 'dialog'
2241
2242, date
2243
2244, <span class="optional">[</span>onSelect<span class="optional">] </span>
2245
2246, <span class="optional">[</span>settings<span class="optional">] </span>
2247
2248, <span class="optional">[</span>pos<span class="optional">] </span>)</dd>
2249 </dl>
2250 </div>
2251 <div class="method-description">
2252 <p>Open a datepicker in a "dialog" box.
2253</p><p>dateText: the initial date for the date picker as either a Date or a string in the current date format.
2254</p><p>onSelect: A callback function when a date is selected. The function receives the date text and date picker instance as parameters.
2255</p><p>settings: The new settings for the date picker.
2256</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>
2257 </div>
2258</li>
2259
2260
2261<li class="method" id="method-isDisabled">
2262 <div class="method-header">
2263 <h3 class="method-name"><a href="#method-isDisabled">isDisabled</a></h3>
2264 <dl>
2265 <dt class="method-signature-label">Signature:</dt>
2266 <dd class="method-signature">.datepicker( 'isDisabled'
2267
2268
2269
2270
2271
2272
2273
2274)</dd>
2275 </dl>
2276 </div>
2277 <div class="method-description">
2278 <p>Determine whether a date picker has been disabled.</p>
2279 </div>
2280</li>
2281
2282
2283<li class="method" id="method-hide">
2284 <div class="method-header">
2285 <h3 class="method-name"><a href="#method-hide">hide</a></h3>
2286 <dl>
2287 <dt class="method-signature-label">Signature:</dt>
2288 <dd class="method-signature">.datepicker( 'hide'
2289
2290, <span class="optional">[</span>speed<span class="optional">] </span>
2291
2292
2293
2294
2295
2296)</dd>
2297 </dl>
2298 </div>
2299 <div class="method-description">
2300 <p>Close a previously opened date picker.
2301</p><p>speed: The speed at which to close the date picker.</p>
2302 </div>
2303</li>
2304
2305
2306<li class="method" id="method-show">
2307 <div class="method-header">
2308 <h3 class="method-name"><a href="#method-show">show</a></h3>
2309 <dl>
2310 <dt class="method-signature-label">Signature:</dt>
2311 <dd class="method-signature">.datepicker( 'show'
2312
2313
2314
2315
2316
2317
2318
2319)</dd>
2320 </dl>
2321 </div>
2322 <div class="method-description">
2323 <p>Call up a previously attached date picker.</p>
2324 </div>
2325</li>
2326
2327
2328<li class="method" id="method-getDate">
2329 <div class="method-header">
2330 <h3 class="method-name"><a href="#method-getDate">getDate</a></h3>
2331 <dl>
2332 <dt class="method-signature-label">Signature:</dt>
2333 <dd class="method-signature">.datepicker( 'getDate'
2334
2335
2336
2337
2338
2339
2340
2341)</dd>
2342 </dl>
2343 </div>
2344 <div class="method-description">
2345 <p>Returns the current date for the datepicker or null if no date has been selected.</p>
2346 </div>
2347</li>
2348
2349
2350<li class="method" id="method-setDate">
2351 <div class="method-header">
2352 <h3 class="method-name"><a href="#method-setDate">setDate</a></h3>
2353 <dl>
2354 <dt class="method-signature-label">Signature:</dt>
2355 <dd class="method-signature">.datepicker( 'setDate'
2356
2357, date
2358
2359
2360
2361
2362
2363)</dd>
2364 </dl>
2365 </div>
2366 <div class="method-description">
2367 <p>Sets the current date for the datepicker. The new date may also be 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.</p>
2368 </div>
2369</li>
2370
2371 </ul>
2372 </div>
2373 <div id="theming">
2374 <h2 class="top-header">Theming</h2>
2375 <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.
2376</p>
2377 <p>If a deeper level of customization is needed, there are widget-specific classes referenced within the ui.datepicker.css stylesheet that can be modified. These classes are highlighed in bold below.
2378</p>
2379
2380 <h3>Sample markup with jQuery UI CSS Framework classes</h3>
2381 &lt;div id=&quot;ui-datepicker-div&quot; class=&quot;<strong>ui-datepicker</strong> ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible&quot;&gt;<br />
2382&nbsp;&nbsp;&nbsp;&lt;div class=&quot;<strong>ui-datepicker-header</strong> ui-widget-header ui-helper-clearfix ui-corner-all&quot;&gt;<br />
2383&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a class=&quot;<strong>ui-datepicker-prev</strong> ui-corner-all&quot;&gt;title=&quot;Prev&quot;&gt;&lt;span class=&quot;ui-icon ui-icon-circle-triangle-w&quot;&gt;Prev&lt;/span&gt;&lt;/a&gt;<br />
2384&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a class=&quot;<strong>ui-datepicker-next</strong> ui-corner-all&quot; title=&quot;Next&quot;&gt;&lt;span class=&quot;ui-icon ui-icon-circle-triangle-e&quot;&gt;Next&lt;/span&gt;&lt;/a&gt;<br />
2385&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;<strong>ui-datepicker-title</strong>&quot;&gt;<br />
2386&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;span class=&quot;<strong>ui-datepicker-month</strong>&quot;&gt;January&lt;/span&gt;&lt;span class=&quot;<strong>ui-datepicker-year</strong>&quot;&gt;2009&lt;/span&gt;<br />
2387&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;<br />
2388&nbsp;&nbsp;&nbsp;&lt;/div&gt;<br />
2389&nbsp;&nbsp;&nbsp;&lt;table class=&quot;<strong>ui-datepicker-calendar</strong>&quot;&gt;<br />
2390&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;thead&gt;<br />
2391&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;<br />
2392&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;th class=&quot;<strong>ui-datepicker-week-end</strong>&quot;&gt;&lt;span title=&quot;Sunday&quot;&gt;Su&lt;/span&gt;&lt;/th&gt;<br />
2393&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...<br />
2394&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/tr&gt;<br />
2395&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/thead&gt;<br />
2396&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tbody&gt;&lt;tr&gt;<br />
2397&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td class=&quot;<strong>ui-datepicker-week-end ui-datepicker-other-month</strong> &quot;&gt;&nbsp;1&nbsp;&lt;/td&gt;<br />
2398&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...<br />
2399&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/tr&gt;<br />
2400&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/tbody&gt;<br />
2401&nbsp;&nbsp;&nbsp;&lt;/table&gt;<br />
2402&nbsp;&nbsp;&nbsp;&lt;div class=&quot;<strong>ui-datepicker-buttonpane</strong> ui-widget-content&quot;&gt;<br />
2403&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;button type=&quot;button&quot; class=&quot;<strong>ui-datepicker-current</strong> ui-state-default ui-priority-secondary ui-corner-all&quot;&gt;Today&lt;/button&gt;<br />
2404&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;button type=&quot;button&quot; class=&quot;<strong>ui-datepicker-close</strong> ui-state-default ui-priority-primary ui-corner-all&quot;&gt;Done&lt;/button&gt;<br />
2405&nbsp;&nbsp;&nbsp;&lt;/div&gt;<br />
2406&lt;/div&gt;<br />
2407 <p class="theme-note">
2408 <strong>
2409 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 &lt;input type="text" /&gt; or &lt;div&gt;&lt;/div&gt;.
2410 </strong>
2411 </p>
2412
2413 </div>
2414</div>
2415
2416</p><!--
2417Pre-expand include size: 91307 bytes
2418Post-expand include size: 185063 bytes
2419Template argument size: 117366 bytes
2420Maximum: 2097152 bytes
2421-->
2422
2423<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3774-1!1!0!!en!2 and timestamp 20100128052928 -->
Note: See TracBrowser for help on using the repository browser.