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> |
|
55 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> |
|
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"> |
|
68 A simple jQuery UI Datepicker.<br /> |
|
69 </p> |
|
70 <pre>$("#datepicker").datepicker(); |
|
71 </pre> |
|
72 <p></div><div id="source" class="tabs-container"> |
|
73 </p> |
|
74 <pre><!DOCTYPE html> |
|
75 <html> |
|
76 <head> |
|
77 <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> |
|
78 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> |
|
79 <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> |
|
80 |
|
81 <script> |
|
82 $(document).ready(function() { |
|
83 $("#datepicker").datepicker(); |
|
84 }); |
|
85 </script> |
|
86 </head> |
|
87 <body style="font-size:62.5%;"> |
|
88 |
|
89 <div type="text" id="datepicker"></div> |
|
90 |
|
91 </body> |
|
92 </html> |
|
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-disabled"> |
|
103 <div class="option-header"> |
|
104 <h3 class="option-name"><a href="#option-disabled">disabled</a></h3> |
|
105 <dl> |
|
106 <dt class="option-type-label">Type:</dt> |
|
107 <dd class="option-type">Boolean</dd> |
|
108 |
|
109 <dt class="option-default-label">Default:</dt> |
|
110 <dd class="option-default">false</dd> |
|
111 |
|
112 </dl> |
|
113 </div> |
|
114 <div class="option-description"> |
|
115 <p>Disables (true) or enables (false) the datepicker. Can be set when initialising (first creating) the datepicker.</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>disabled</code> option specified. |
|
123 </dt> |
|
124 <dd> |
|
125 <pre><code>$( ".selector" ).datepicker({ disabled: true });</code></pre> |
|
126 </dd> |
|
127 |
|
128 |
|
129 <dt> |
|
130 Get or set the <code>disabled</code> option, after init. |
|
131 </dt> |
|
132 <dd> |
|
133 <pre><code>//getter |
|
134 var disabled = $( ".selector" ).datepicker( "option", "disabled" ); |
|
135 //setter |
|
136 $( ".selector" ).datepicker( "option", "disabled", true );</code></pre> |
|
137 </dd> |
|
138 |
|
139 </dl> |
|
140 </div> |
|
141 </li> |
|
142 |
|
143 |
|
144 <li class="option" id="option-altField"> |
|
145 <div class="option-header"> |
|
146 <h3 class="option-name"><a href="#option-altField">altField</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 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> |
|
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>altField</code> option specified. |
|
165 </dt> |
|
166 <dd> |
|
167 <pre><code>$( ".selector" ).datepicker({ altField: '#actualDate' });</code></pre> |
|
168 </dd> |
|
169 |
|
170 |
|
171 <dt> |
|
172 Get or set the <code>altField</code> option, after init. |
|
173 </dt> |
|
174 <dd> |
|
175 <pre><code>//getter |
|
176 var altField = $( ".selector" ).datepicker( "option", "altField" ); |
|
177 //setter |
|
178 $( ".selector" ).datepicker( "option", "altField", '#actualDate' );</code></pre> |
|
179 </dd> |
|
180 |
|
181 </dl> |
|
182 </div> |
|
183 </li> |
|
184 |
|
185 |
|
186 <li class="option" id="option-altFormat"> |
|
187 <div class="option-header"> |
|
188 <h3 class="option-name"><a href="#option-altFormat">altFormat</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 <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> |
|
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>altFormat</code> option specified. |
|
207 </dt> |
|
208 <dd> |
|
209 <pre><code>$( ".selector" ).datepicker({ altFormat: 'yy-mm-dd' });</code></pre> |
|
210 </dd> |
|
211 |
|
212 |
|
213 <dt> |
|
214 Get or set the <code>altFormat</code> option, after init. |
|
215 </dt> |
|
216 <dd> |
|
217 <pre><code>//getter |
|
218 var altFormat = $( ".selector" ).datepicker( "option", "altFormat" ); |
|
219 //setter |
|
220 $( ".selector" ).datepicker( "option", "altFormat", 'yy-mm-dd' );</code></pre> |
|
221 </dd> |
|
222 |
|
223 </dl> |
|
224 </div> |
|
225 </li> |
|
226 |
|
227 |
|
228 <li class="option" id="option-appendText"> |
|
229 <div class="option-header"> |
|
230 <h3 class="option-name"><a href="#option-appendText">appendText</a></h3> |
|
231 <dl> |
|
232 <dt class="option-type-label">Type:</dt> |
|
233 <dd class="option-type">String</dd> |
|
234 |
|
235 <dt class="option-default-label">Default:</dt> |
|
236 <dd class="option-default">''</dd> |
|
237 |
|
238 </dl> |
|
239 </div> |
|
240 <div class="option-description"> |
|
241 <p>The text to display after each date field, e.g. to show the required format.</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>appendText</code> option specified. |
|
249 </dt> |
|
250 <dd> |
|
251 <pre><code>$( ".selector" ).datepicker({ appendText: '(yyyy-mm-dd)' });</code></pre> |
|
252 </dd> |
|
253 |
|
254 |
|
255 <dt> |
|
256 Get or set the <code>appendText</code> option, after init. |
|
257 </dt> |
|
258 <dd> |
|
259 <pre><code>//getter |
|
260 var appendText = $( ".selector" ).datepicker( "option", "appendText" ); |
|
261 //setter |
|
262 $( ".selector" ).datepicker( "option", "appendText", '(yyyy-mm-dd)' );</code></pre> |
|
263 </dd> |
|
264 |
|
265 </dl> |
|
266 </div> |
|
267 </li> |
|
268 |
|
269 |
|
270 <li class="option" id="option-autoSize"> |
|
271 <div class="option-header"> |
|
272 <h3 class="option-name"><a href="#option-autoSize">autoSize</a></h3> |
|
273 <dl> |
|
274 <dt class="option-type-label">Type:</dt> |
|
275 <dd class="option-type">Boolean</dd> |
|
276 |
|
277 <dt class="option-default-label">Default:</dt> |
|
278 <dd class="option-default">false</dd> |
|
279 |
|
280 </dl> |
|
281 </div> |
|
282 <div class="option-description"> |
|
283 <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> |
|
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>autoSize</code> option specified. |
|
291 </dt> |
|
292 <dd> |
|
293 <pre><code>$( ".selector" ).datepicker({ autoSize: true });</code></pre> |
|
294 </dd> |
|
295 |
|
296 |
|
297 <dt> |
|
298 Get or set the <code>autoSize</code> option, after init. |
|
299 </dt> |
|
300 <dd> |
|
301 <pre><code>//getter |
|
302 var autoSize = $( ".selector" ).datepicker( "option", "autoSize" ); |
|
303 //setter |
|
304 $( ".selector" ).datepicker( "option", "autoSize", true );</code></pre> |
|
305 </dd> |
|
306 |
|
307 </dl> |
|
308 </div> |
|
309 </li> |
|
310 |
|
311 |
|
312 <li class="option" id="option-buttonImage"> |
|
313 <div class="option-header"> |
|
314 <h3 class="option-name"><a href="#option-buttonImage">buttonImage</a></h3> |
|
315 <dl> |
|
316 <dt class="option-type-label">Type:</dt> |
|
317 <dd class="option-type">String</dd> |
|
318 |
|
319 <dt class="option-default-label">Default:</dt> |
|
320 <dd class="option-default">''</dd> |
|
321 |
|
322 </dl> |
|
323 </div> |
|
324 <div class="option-description"> |
|
325 <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> |
|
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>buttonImage</code> option specified. |
|
333 </dt> |
|
334 <dd> |
|
335 <pre><code>$( ".selector" ).datepicker({ buttonImage: '/images/datepicker.gif' });</code></pre> |
|
336 </dd> |
|
337 |
|
338 |
|
339 <dt> |
|
340 Get or set the <code>buttonImage</code> option, after init. |
|
341 </dt> |
|
342 <dd> |
|
343 <pre><code>//getter |
|
344 var buttonImage = $( ".selector" ).datepicker( "option", "buttonImage" ); |
|
345 //setter |
|
346 $( ".selector" ).datepicker( "option", "buttonImage", '/images/datepicker.gif' );</code></pre> |
|
347 </dd> |
|
348 |
|
349 </dl> |
|
350 </div> |
|
351 </li> |
|
352 |
|
353 |
|
354 <li class="option" id="option-buttonImageOnly"> |
|
355 <div class="option-header"> |
|
356 <h3 class="option-name"><a href="#option-buttonImageOnly">buttonImageOnly</a></h3> |
|
357 <dl> |
|
358 <dt class="option-type-label">Type:</dt> |
|
359 <dd class="option-type">Boolean</dd> |
|
360 |
|
361 <dt class="option-default-label">Default:</dt> |
|
362 <dd class="option-default">false</dd> |
|
363 |
|
364 </dl> |
|
365 </div> |
|
366 <div class="option-description"> |
|
367 <p>Set to true to place an image after the field to use as the trigger without it appearing on a button.</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>buttonImageOnly</code> option specified. |
|
375 </dt> |
|
376 <dd> |
|
377 <pre><code>$( ".selector" ).datepicker({ buttonImageOnly: true });</code></pre> |
|
378 </dd> |
|
379 |
|
380 |
|
381 <dt> |
|
382 Get or set the <code>buttonImageOnly</code> option, after init. |
|
383 </dt> |
|
384 <dd> |
|
385 <pre><code>//getter |
|
386 var buttonImageOnly = $( ".selector" ).datepicker( "option", "buttonImageOnly" ); |
|
387 //setter |
|
388 $( ".selector" ).datepicker( "option", "buttonImageOnly", true );</code></pre> |
|
389 </dd> |
|
390 |
|
391 </dl> |
|
392 </div> |
|
393 </li> |
|
394 |
|
395 |
|
396 <li class="option" id="option-buttonText"> |
|
397 <div class="option-header"> |
|
398 <h3 class="option-name"><a href="#option-buttonText">buttonText</a></h3> |
|
399 <dl> |
|
400 <dt class="option-type-label">Type:</dt> |
|
401 <dd class="option-type">String</dd> |
|
402 |
|
403 <dt class="option-default-label">Default:</dt> |
|
404 <dd class="option-default">'...'</dd> |
|
405 |
|
406 </dl> |
|
407 </div> |
|
408 <div class="option-description"> |
|
409 <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> |
|
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>buttonText</code> option specified. |
|
417 </dt> |
|
418 <dd> |
|
419 <pre><code>$( ".selector" ).datepicker({ buttonText: 'Choose' });</code></pre> |
|
420 </dd> |
|
421 |
|
422 |
|
423 <dt> |
|
424 Get or set the <code>buttonText</code> option, after init. |
|
425 </dt> |
|
426 <dd> |
|
427 <pre><code>//getter |
|
428 var buttonText = $( ".selector" ).datepicker( "option", "buttonText" ); |
|
429 //setter |
|
430 $( ".selector" ).datepicker( "option", "buttonText", 'Choose' );</code></pre> |
|
431 </dd> |
|
432 |
|
433 </dl> |
|
434 </div> |
|
435 </li> |
|
436 |
|
437 |
|
438 <li class="option" id="option-calculateWeek"> |
|
439 <div class="option-header"> |
|
440 <h3 class="option-name"><a href="#option-calculateWeek">calculateWeek</a></h3> |
|
441 <dl> |
|
442 <dt class="option-type-label">Type:</dt> |
|
443 <dd class="option-type">Function</dd> |
|
444 |
|
445 <dt class="option-default-label">Default:</dt> |
|
446 <dd class="option-default">$.datepicker.iso8601Week</dd> |
|
447 |
|
448 </dl> |
|
449 </div> |
|
450 <div class="option-description"> |
|
451 <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> |
|
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>calculateWeek</code> option specified. |
|
459 </dt> |
|
460 <dd> |
|
461 <pre><code>$( ".selector" ).datepicker({ calculateWeek: myWeekCalc });</code></pre> |
|
462 </dd> |
|
463 |
|
464 |
|
465 <dt> |
|
466 Get or set the <code>calculateWeek</code> option, after init. |
|
467 </dt> |
|
468 <dd> |
|
469 <pre><code>//getter |
|
470 var calculateWeek = $( ".selector" ).datepicker( "option", "calculateWeek" ); |
|
471 //setter |
|
472 $( ".selector" ).datepicker( "option", "calculateWeek", myWeekCalc );</code></pre> |
|
473 </dd> |
|
474 |
|
475 </dl> |
|
476 </div> |
|
477 </li> |
|
478 |
|
479 |
|
480 <li class="option" id="option-changeMonth"> |
|
481 <div class="option-header"> |
|
482 <h3 class="option-name"><a href="#option-changeMonth">changeMonth</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 month 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>changeMonth</code> option specified. |
|
501 </dt> |
|
502 <dd> |
|
503 <pre><code>$( ".selector" ).datepicker({ changeMonth: true });</code></pre> |
|
504 </dd> |
|
505 |
|
506 |
|
507 <dt> |
|
508 Get or set the <code>changeMonth</code> option, after init. |
|
509 </dt> |
|
510 <dd> |
|
511 <pre><code>//getter |
|
512 var changeMonth = $( ".selector" ).datepicker( "option", "changeMonth" ); |
|
513 //setter |
|
514 $( ".selector" ).datepicker( "option", "changeMonth", true );</code></pre> |
|
515 </dd> |
|
516 |
|
517 </dl> |
|
518 </div> |
|
519 </li> |
|
520 |
|
521 |
|
522 <li class="option" id="option-changeYear"> |
|
523 <div class="option-header"> |
|
524 <h3 class="option-name"><a href="#option-changeYear">changeYear</a></h3> |
|
525 <dl> |
|
526 <dt class="option-type-label">Type:</dt> |
|
527 <dd class="option-type">Boolean</dd> |
|
528 |
|
529 <dt class="option-default-label">Default:</dt> |
|
530 <dd class="option-default">false</dd> |
|
531 |
|
532 </dl> |
|
533 </div> |
|
534 <div class="option-description"> |
|
535 <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> |
|
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>changeYear</code> option specified. |
|
543 </dt> |
|
544 <dd> |
|
545 <pre><code>$( ".selector" ).datepicker({ changeYear: true });</code></pre> |
|
546 </dd> |
|
547 |
|
548 |
|
549 <dt> |
|
550 Get or set the <code>changeYear</code> option, after init. |
|
551 </dt> |
|
552 <dd> |
|
553 <pre><code>//getter |
|
554 var changeYear = $( ".selector" ).datepicker( "option", "changeYear" ); |
|
555 //setter |
|
556 $( ".selector" ).datepicker( "option", "changeYear", true );</code></pre> |
|
557 </dd> |
|
558 |
|
559 </dl> |
|
560 </div> |
|
561 </li> |
|
562 |
|
563 |
|
564 <li class="option" id="option-closeText"> |
|
565 <div class="option-header"> |
|
566 <h3 class="option-name"><a href="#option-closeText">closeText</a></h3> |
|
567 <dl> |
|
568 <dt class="option-type-label">Type:</dt> |
|
569 <dd class="option-type">String</dd> |
|
570 |
|
571 <dt class="option-default-label">Default:</dt> |
|
572 <dd class="option-default">'Done'</dd> |
|
573 |
|
574 </dl> |
|
575 </div> |
|
576 <div class="option-description"> |
|
577 <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> |
|
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>closeText</code> option specified. |
|
585 </dt> |
|
586 <dd> |
|
587 <pre><code>$( ".selector" ).datepicker({ closeText: 'X' });</code></pre> |
|
588 </dd> |
|
589 |
|
590 |
|
591 <dt> |
|
592 Get or set the <code>closeText</code> option, after init. |
|
593 </dt> |
|
594 <dd> |
|
595 <pre><code>//getter |
|
596 var closeText = $( ".selector" ).datepicker( "option", "closeText" ); |
|
597 //setter |
|
598 $( ".selector" ).datepicker( "option", "closeText", 'X' );</code></pre> |
|
599 </dd> |
|
600 |
|
601 </dl> |
|
602 </div> |
|
603 </li> |
|
604 |
|
605 |
|
606 <li class="option" id="option-constrainInput"> |
|
607 <div class="option-header"> |
|
608 <h3 class="option-name"><a href="#option-constrainInput">constrainInput</a></h3> |
|
609 <dl> |
|
610 <dt class="option-type-label">Type:</dt> |
|
611 <dd class="option-type">Boolean</dd> |
|
612 |
|
613 <dt class="option-default-label">Default:</dt> |
|
614 <dd class="option-default">true</dd> |
|
615 |
|
616 </dl> |
|
617 </div> |
|
618 <div class="option-description"> |
|
619 <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> |
|
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>constrainInput</code> option specified. |
|
627 </dt> |
|
628 <dd> |
|
629 <pre><code>$( ".selector" ).datepicker({ constrainInput: false });</code></pre> |
|
630 </dd> |
|
631 |
|
632 |
|
633 <dt> |
|
634 Get or set the <code>constrainInput</code> option, after init. |
|
635 </dt> |
|
636 <dd> |
|
637 <pre><code>//getter |
|
638 var constrainInput = $( ".selector" ).datepicker( "option", "constrainInput" ); |
|
639 //setter |
|
640 $( ".selector" ).datepicker( "option", "constrainInput", false );</code></pre> |
|
641 </dd> |
|
642 |
|
643 </dl> |
|
644 </div> |
|
645 </li> |
|
646 |
|
647 |
|
648 <li class="option" id="option-currentText"> |
|
649 <div class="option-header"> |
|
650 <h3 class="option-name"><a href="#option-currentText">currentText</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">'Today'</dd> |
|
657 |
|
658 </dl> |
|
659 </div> |
|
660 <div class="option-description"> |
|
661 <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> |
|
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>currentText</code> option specified. |
|
669 </dt> |
|
670 <dd> |
|
671 <pre><code>$( ".selector" ).datepicker({ currentText: 'Now' });</code></pre> |
|
672 </dd> |
|
673 |
|
674 |
|
675 <dt> |
|
676 Get or set the <code>currentText</code> option, after init. |
|
677 </dt> |
|
678 <dd> |
|
679 <pre><code>//getter |
|
680 var currentText = $( ".selector" ).datepicker( "option", "currentText" ); |
|
681 //setter |
|
682 $( ".selector" ).datepicker( "option", "currentText", 'Now' );</code></pre> |
|
683 </dd> |
|
684 |
|
685 </dl> |
|
686 </div> |
|
687 </li> |
|
688 |
|
689 |
|
690 <li class="option" id="option-dateFormat"> |
|
691 <div class="option-header"> |
|
692 <h3 class="option-name"><a href="#option-dateFormat">dateFormat</a></h3> |
|
693 <dl> |
|
694 <dt class="option-type-label">Type:</dt> |
|
695 <dd class="option-type">String</dd> |
|
696 |
|
697 <dt class="option-default-label">Default:</dt> |
|
698 <dd class="option-default">'mm/dd/yy'</dd> |
|
699 |
|
700 </dl> |
|
701 </div> |
|
702 <div class="option-description"> |
|
703 <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> |
|
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>dateFormat</code> option specified. |
|
711 </dt> |
|
712 <dd> |
|
713 <pre><code>$( ".selector" ).datepicker({ dateFormat: 'yy-mm-dd' });</code></pre> |
|
714 </dd> |
|
715 |
|
716 |
|
717 <dt> |
|
718 Get or set the <code>dateFormat</code> option, after init. |
|
719 </dt> |
|
720 <dd> |
|
721 <pre><code>//getter |
|
722 var dateFormat = $( ".selector" ).datepicker( "option", "dateFormat" ); |
|
723 //setter |
|
724 $( ".selector" ).datepicker( "option", "dateFormat", 'yy-mm-dd' );</code></pre> |
|
725 </dd> |
|
726 |
|
727 </dl> |
|
728 </div> |
|
729 </li> |
|
730 |
|
731 |
|
732 <li class="option" id="option-dayNames"> |
|
733 <div class="option-header"> |
|
734 <h3 class="option-name"><a href="#option-dayNames">dayNames</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">['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']</dd> |
|
741 |
|
742 </dl> |
|
743 </div> |
|
744 <div class="option-description"> |
|
745 <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> |
|
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>dayNames</code> option specified. |
|
753 </dt> |
|
754 <dd> |
|
755 <pre><code>$( ".selector" ).datepicker({ dayNames: ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'] });</code></pre> |
|
756 </dd> |
|
757 |
|
758 |
|
759 <dt> |
|
760 Get or set the <code>dayNames</code> option, after init. |
|
761 </dt> |
|
762 <dd> |
|
763 <pre><code>//getter |
|
764 var dayNames = $( ".selector" ).datepicker( "option", "dayNames" ); |
|
765 //setter |
|
766 $( ".selector" ).datepicker( "option", "dayNames", ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'] );</code></pre> |
|
767 </dd> |
|
768 |
|
769 </dl> |
|
770 </div> |
|
771 </li> |
|
772 |
|
773 |
|
774 <li class="option" id="option-dayNamesMin"> |
|
775 <div class="option-header"> |
|
776 <h3 class="option-name"><a href="#option-dayNamesMin">dayNamesMin</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">['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']</dd> |
|
783 |
|
784 </dl> |
|
785 </div> |
|
786 <div class="option-description"> |
|
787 <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> |
|
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>dayNamesMin</code> option specified. |
|
795 </dt> |
|
796 <dd> |
|
797 <pre><code>$( ".selector" ).datepicker({ dayNamesMin: ['Di', 'Lu', 'Ma', 'Me', 'Je', 'Ve', 'Sa'] });</code></pre> |
|
798 </dd> |
|
799 |
|
800 |
|
801 <dt> |
|
802 Get or set the <code>dayNamesMin</code> option, after init. |
|
803 </dt> |
|
804 <dd> |
|
805 <pre><code>//getter |
|
806 var dayNamesMin = $( ".selector" ).datepicker( "option", "dayNamesMin" ); |
|
807 //setter |
|
808 $( ".selector" ).datepicker( "option", "dayNamesMin", ['Di', 'Lu', 'Ma', 'Me', 'Je', 'Ve', 'Sa'] );</code></pre> |
|
809 </dd> |
|
810 |
|
811 </dl> |
|
812 </div> |
|
813 </li> |
|
814 |
|
815 |
|
816 <li class="option" id="option-dayNamesShort"> |
|
817 <div class="option-header"> |
|
818 <h3 class="option-name"><a href="#option-dayNamesShort">dayNamesShort</a></h3> |
|
819 <dl> |
|
820 <dt class="option-type-label">Type:</dt> |
|
821 <dd class="option-type">Array</dd> |
|
822 |
|
823 <dt class="option-default-label">Default:</dt> |
|
824 <dd class="option-default">['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']</dd> |
|
825 |
|
826 </dl> |
|
827 </div> |
|
828 <div class="option-description"> |
|
829 <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> |
|
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>dayNamesShort</code> option specified. |
|
837 </dt> |
|
838 <dd> |
|
839 <pre><code>$( ".selector" ).datepicker({ dayNamesShort: ['Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam'] });</code></pre> |
|
840 </dd> |
|
841 |
|
842 |
|
843 <dt> |
|
844 Get or set the <code>dayNamesShort</code> option, after init. |
|
845 </dt> |
|
846 <dd> |
|
847 <pre><code>//getter |
|
848 var dayNamesShort = $( ".selector" ).datepicker( "option", "dayNamesShort" ); |
|
849 //setter |
|
850 $( ".selector" ).datepicker( "option", "dayNamesShort", ['Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam'] );</code></pre> |
|
851 </dd> |
|
852 |
|
853 </dl> |
|
854 </div> |
|
855 </li> |
|
856 |
|
857 |
|
858 <li class="option" id="option-defaultDate"> |
|
859 <div class="option-header"> |
|
860 <h3 class="option-name"><a href="#option-defaultDate">defaultDate</a></h3> |
|
861 <dl> |
|
862 <dt class="option-type-label">Type:</dt> |
|
863 <dd class="option-type">Date, Number, String</dd> |
|
864 |
|
865 <dt class="option-default-label">Default:</dt> |
|
866 <dd class="option-default">null</dd> |
|
867 |
|
868 </dl> |
|
869 </div> |
|
870 <div class="option-description"> |
|
871 <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> |
|
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>defaultDate</code> option specified. |
|
879 </dt> |
|
880 <dd> |
|
881 <pre><code>$( ".selector" ).datepicker({ defaultDate: +7 });</code></pre> |
|
882 </dd> |
|
883 |
|
884 |
|
885 <dt> |
|
886 Get or set the <code>defaultDate</code> option, after init. |
|
887 </dt> |
|
888 <dd> |
|
889 <pre><code>//getter |
|
890 var defaultDate = $( ".selector" ).datepicker( "option", "defaultDate" ); |
|
891 //setter |
|
892 $( ".selector" ).datepicker( "option", "defaultDate", +7 );</code></pre> |
|
893 </dd> |
|
894 |
|
895 </dl> |
|
896 </div> |
|
897 </li> |
|
898 |
|
899 |
|
900 <li class="option" id="option-duration"> |
|
901 <div class="option-header"> |
|
902 <h3 class="option-name"><a href="#option-duration">duration</a></h3> |
|
903 <dl> |
|
904 <dt class="option-type-label">Type:</dt> |
|
905 <dd class="option-type">String, Number</dd> |
|
906 |
|
907 <dt class="option-default-label">Default:</dt> |
|
908 <dd class="option-default">'normal'</dd> |
|
909 |
|
910 </dl> |
|
911 </div> |
|
912 <div class="option-description"> |
|
913 <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> |
|
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>duration</code> option specified. |
|
921 </dt> |
|
922 <dd> |
|
923 <pre><code>$( ".selector" ).datepicker({ duration: 'slow' });</code></pre> |
|
924 </dd> |
|
925 |
|
926 |
|
927 <dt> |
|
928 Get or set the <code>duration</code> option, after init. |
|
929 </dt> |
|
930 <dd> |
|
931 <pre><code>//getter |
|
932 var duration = $( ".selector" ).datepicker( "option", "duration" ); |
|
933 //setter |
|
934 $( ".selector" ).datepicker( "option", "duration", 'slow' );</code></pre> |
|
935 </dd> |
|
936 |
|
937 </dl> |
|
938 </div> |
|
939 </li> |
|
940 |
|
941 |
|
942 <li class="option" id="option-firstDay"> |
|
943 <div class="option-header"> |
|
944 <h3 class="option-name"><a href="#option-firstDay">firstDay</a></h3> |
|
945 <dl> |
|
946 <dt class="option-type-label">Type:</dt> |
|
947 <dd class="option-type">Number</dd> |
|
948 |
|
949 <dt class="option-default-label">Default:</dt> |
|
950 <dd class="option-default">0</dd> |
|
951 |
|
952 </dl> |
|
953 </div> |
|
954 <div class="option-description"> |
|
955 <p>Set the first day of the week: Sunday is 0, Monday is 1, ... This attribute is one of the regionalisation attributes.</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>firstDay</code> option specified. |
|
963 </dt> |
|
964 <dd> |
|
965 <pre><code>$( ".selector" ).datepicker({ firstDay: 1 });</code></pre> |
|
966 </dd> |
|
967 |
|
968 |
|
969 <dt> |
|
970 Get or set the <code>firstDay</code> option, after init. |
|
971 </dt> |
|
972 <dd> |
|
973 <pre><code>//getter |
|
974 var firstDay = $( ".selector" ).datepicker( "option", "firstDay" ); |
|
975 //setter |
|
976 $( ".selector" ).datepicker( "option", "firstDay", 1 );</code></pre> |
|
977 </dd> |
|
978 |
|
979 </dl> |
|
980 </div> |
|
981 </li> |
|
982 |
|
983 |
|
984 <li class="option" id="option-gotoCurrent"> |
|
985 <div class="option-header"> |
|
986 <h3 class="option-name"><a href="#option-gotoCurrent">gotoCurrent</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>When true the current day link moves to the currently selected date instead of today.</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>gotoCurrent</code> option specified. |
|
1005 </dt> |
|
1006 <dd> |
|
1007 <pre><code>$( ".selector" ).datepicker({ gotoCurrent: true });</code></pre> |
|
1008 </dd> |
|
1009 |
|
1010 |
|
1011 <dt> |
|
1012 Get or set the <code>gotoCurrent</code> option, after init. |
|
1013 </dt> |
|
1014 <dd> |
|
1015 <pre><code>//getter |
|
1016 var gotoCurrent = $( ".selector" ).datepicker( "option", "gotoCurrent" ); |
|
1017 //setter |
|
1018 $( ".selector" ).datepicker( "option", "gotoCurrent", true );</code></pre> |
|
1019 </dd> |
|
1020 |
|
1021 </dl> |
|
1022 </div> |
|
1023 </li> |
|
1024 |
|
1025 |
|
1026 <li class="option" id="option-hideIfNoPrevNext"> |
|
1027 <div class="option-header"> |
|
1028 <h3 class="option-name"><a href="#option-hideIfNoPrevNext">hideIfNoPrevNext</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>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> |
|
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>hideIfNoPrevNext</code> option specified. |
|
1047 </dt> |
|
1048 <dd> |
|
1049 <pre><code>$( ".selector" ).datepicker({ hideIfNoPrevNext: true });</code></pre> |
|
1050 </dd> |
|
1051 |
|
1052 |
|
1053 <dt> |
|
1054 Get or set the <code>hideIfNoPrevNext</code> option, after init. |
|
1055 </dt> |
|
1056 <dd> |
|
1057 <pre><code>//getter |
|
1058 var hideIfNoPrevNext = $( ".selector" ).datepicker( "option", "hideIfNoPrevNext" ); |
|
1059 //setter |
|
1060 $( ".selector" ).datepicker( "option", "hideIfNoPrevNext", true );</code></pre> |
|
1061 </dd> |
|
1062 |
|
1063 </dl> |
|
1064 </div> |
|
1065 </li> |
|
1066 |
|
1067 |
|
1068 <li class="option" id="option-isRTL"> |
|
1069 <div class="option-header"> |
|
1070 <h3 class="option-name"><a href="#option-isRTL">isRTL</a></h3> |
|
1071 <dl> |
|
1072 <dt class="option-type-label">Type:</dt> |
|
1073 <dd class="option-type">Boolean</dd> |
|
1074 |
|
1075 <dt class="option-default-label">Default:</dt> |
|
1076 <dd class="option-default">false</dd> |
|
1077 |
|
1078 </dl> |
|
1079 </div> |
|
1080 <div class="option-description"> |
|
1081 <p>True if the current language is drawn from right to left. This attribute is one of the regionalisation attributes.</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>isRTL</code> option specified. |
|
1089 </dt> |
|
1090 <dd> |
|
1091 <pre><code>$( ".selector" ).datepicker({ isRTL: true });</code></pre> |
|
1092 </dd> |
|
1093 |
|
1094 |
|
1095 <dt> |
|
1096 Get or set the <code>isRTL</code> option, after init. |
|
1097 </dt> |
|
1098 <dd> |
|
1099 <pre><code>//getter |
|
1100 var isRTL = $( ".selector" ).datepicker( "option", "isRTL" ); |
|
1101 //setter |
|
1102 $( ".selector" ).datepicker( "option", "isRTL", true );</code></pre> |
|
1103 </dd> |
|
1104 |
|
1105 </dl> |
|
1106 </div> |
|
1107 </li> |
|
1108 |
|
1109 |
|
1110 <li class="option" id="option-maxDate"> |
|
1111 <div class="option-header"> |
|
1112 <h3 class="option-name"><a href="#option-maxDate">maxDate</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 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> |
|
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>maxDate</code> option specified. |
|
1131 </dt> |
|
1132 <dd> |
|
1133 <pre><code>$( ".selector" ).datepicker({ maxDate: '+1m +1w' });</code></pre> |
|
1134 </dd> |
|
1135 |
|
1136 |
|
1137 <dt> |
|
1138 Get or set the <code>maxDate</code> option, after init. |
|
1139 </dt> |
|
1140 <dd> |
|
1141 <pre><code>//getter |
|
1142 var maxDate = $( ".selector" ).datepicker( "option", "maxDate" ); |
|
1143 //setter |
|
1144 $( ".selector" ).datepicker( "option", "maxDate", '+1m +1w' );</code></pre> |
|
1145 </dd> |
|
1146 |
|
1147 </dl> |
|
1148 </div> |
|
1149 </li> |
|
1150 |
|
1151 |
|
1152 <li class="option" id="option-minDate"> |
|
1153 <div class="option-header"> |
|
1154 <h3 class="option-name"><a href="#option-minDate">minDate</a></h3> |
|
1155 <dl> |
|
1156 <dt class="option-type-label">Type:</dt> |
|
1157 <dd class="option-type">Date, Number, String</dd> |
|
1158 |
|
1159 <dt class="option-default-label">Default:</dt> |
|
1160 <dd class="option-default">null</dd> |
|
1161 |
|
1162 </dl> |
|
1163 </div> |
|
1164 <div class="option-description"> |
|
1165 <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> |
|
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>minDate</code> option specified. |
|
1173 </dt> |
|
1174 <dd> |
|
1175 <pre><code>$( ".selector" ).datepicker({ minDate: new Date(2007, 1 - 1, 1) });</code></pre> |
|
1176 </dd> |
|
1177 |
|
1178 |
|
1179 <dt> |
|
1180 Get or set the <code>minDate</code> option, after init. |
|
1181 </dt> |
|
1182 <dd> |
|
1183 <pre><code>//getter |
|
1184 var minDate = $( ".selector" ).datepicker( "option", "minDate" ); |
|
1185 //setter |
|
1186 $( ".selector" ).datepicker( "option", "minDate", new Date(2007, 1 - 1, 1) );</code></pre> |
|
1187 </dd> |
|
1188 |
|
1189 </dl> |
|
1190 </div> |
|
1191 </li> |
|
1192 |
|
1193 |
|
1194 <li class="option" id="option-monthNames"> |
|
1195 <div class="option-header"> |
|
1196 <h3 class="option-name"><a href="#option-monthNames">monthNames</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">['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']</dd> |
|
1203 |
|
1204 </dl> |
|
1205 </div> |
|
1206 <div class="option-description"> |
|
1207 <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> |
|
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>monthNames</code> option specified. |
|
1215 </dt> |
|
1216 <dd> |
|
1217 <pre><code>$( ".selector" ).datepicker({ monthNames: ['Januar','Februar','Marts','April','Maj','Juni','Juli','August','September','Oktober','November','December'] });</code></pre> |
|
1218 </dd> |
|
1219 |
|
1220 |
|
1221 <dt> |
|
1222 Get or set the <code>monthNames</code> option, after init. |
|
1223 </dt> |
|
1224 <dd> |
|
1225 <pre><code>//getter |
|
1226 var monthNames = $( ".selector" ).datepicker( "option", "monthNames" ); |
|
1227 //setter |
|
1228 $( ".selector" ).datepicker( "option", "monthNames", ['Januar','Februar','Marts','April','Maj','Juni','Juli','August','September','Oktober','November','December'] );</code></pre> |
|
1229 </dd> |
|
1230 |
|
1231 </dl> |
|
1232 </div> |
|
1233 </li> |
|
1234 |
|
1235 |
|
1236 <li class="option" id="option-monthNamesShort"> |
|
1237 <div class="option-header"> |
|
1238 <h3 class="option-name"><a href="#option-monthNamesShort">monthNamesShort</a></h3> |
|
1239 <dl> |
|
1240 <dt class="option-type-label">Type:</dt> |
|
1241 <dd class="option-type">Array</dd> |
|
1242 |
|
1243 <dt class="option-default-label">Default:</dt> |
|
1244 <dd class="option-default">['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']</dd> |
|
1245 |
|
1246 </dl> |
|
1247 </div> |
|
1248 <div class="option-description"> |
|
1249 <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> |
|
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>monthNamesShort</code> option specified. |
|
1257 </dt> |
|
1258 <dd> |
|
1259 <pre><code>$( ".selector" ).datepicker({ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun','Jul','Aug','Sep','Okt','Nov','Dec'] });</code></pre> |
|
1260 </dd> |
|
1261 |
|
1262 |
|
1263 <dt> |
|
1264 Get or set the <code>monthNamesShort</code> option, after init. |
|
1265 </dt> |
|
1266 <dd> |
|
1267 <pre><code>//getter |
|
1268 var monthNamesShort = $( ".selector" ).datepicker( "option", "monthNamesShort" ); |
|
1269 //setter |
|
1270 $( ".selector" ).datepicker( "option", "monthNamesShort", ['Jan','Feb','Mar','Apr','Maj','Jun','Jul','Aug','Sep','Okt','Nov','Dec'] );</code></pre> |
|
1271 </dd> |
|
1272 |
|
1273 </dl> |
|
1274 </div> |
|
1275 </li> |
|
1276 |
|
1277 |
|
1278 <li class="option" id="option-navigationAsDateFormat"> |
|
1279 <div class="option-header"> |
|
1280 <h3 class="option-name"><a href="#option-navigationAsDateFormat">navigationAsDateFormat</a></h3> |
|
1281 <dl> |
|
1282 <dt class="option-type-label">Type:</dt> |
|
1283 <dd class="option-type">Boolean</dd> |
|
1284 |
|
1285 <dt class="option-default-label">Default:</dt> |
|
1286 <dd class="option-default">false</dd> |
|
1287 |
|
1288 </dl> |
|
1289 </div> |
|
1290 <div class="option-description"> |
|
1291 <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> |
|
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>navigationAsDateFormat</code> option specified. |
|
1299 </dt> |
|
1300 <dd> |
|
1301 <pre><code>$( ".selector" ).datepicker({ navigationAsDateFormat: true });</code></pre> |
|
1302 </dd> |
|
1303 |
|
1304 |
|
1305 <dt> |
|
1306 Get or set the <code>navigationAsDateFormat</code> option, after init. |
|
1307 </dt> |
|
1308 <dd> |
|
1309 <pre><code>//getter |
|
1310 var navigationAsDateFormat = $( ".selector" ).datepicker( "option", "navigationAsDateFormat" ); |
|
1311 //setter |
|
1312 $( ".selector" ).datepicker( "option", "navigationAsDateFormat", true );</code></pre> |
|
1313 </dd> |
|
1314 |
|
1315 </dl> |
|
1316 </div> |
|
1317 </li> |
|
1318 |
|
1319 |
|
1320 <li class="option" id="option-nextText"> |
|
1321 <div class="option-header"> |
|
1322 <h3 class="option-name"><a href="#option-nextText">nextText</a></h3> |
|
1323 <dl> |
|
1324 <dt class="option-type-label">Type:</dt> |
|
1325 <dd class="option-type">String</dd> |
|
1326 |
|
1327 <dt class="option-default-label">Default:</dt> |
|
1328 <dd class="option-default">'Next'</dd> |
|
1329 |
|
1330 </dl> |
|
1331 </div> |
|
1332 <div class="option-description"> |
|
1333 <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> |
|
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>nextText</code> option specified. |
|
1341 </dt> |
|
1342 <dd> |
|
1343 <pre><code>$( ".selector" ).datepicker({ nextText: 'Later' });</code></pre> |
|
1344 </dd> |
|
1345 |
|
1346 |
|
1347 <dt> |
|
1348 Get or set the <code>nextText</code> option, after init. |
|
1349 </dt> |
|
1350 <dd> |
|
1351 <pre><code>//getter |
|
1352 var nextText = $( ".selector" ).datepicker( "option", "nextText" ); |
|
1353 //setter |
|
1354 $( ".selector" ).datepicker( "option", "nextText", 'Later' );</code></pre> |
|
1355 </dd> |
|
1356 |
|
1357 </dl> |
|
1358 </div> |
|
1359 </li> |
|
1360 |
|
1361 |
|
1362 <li class="option" id="option-numberOfMonths"> |
|
1363 <div class="option-header"> |
|
1364 <h3 class="option-name"><a href="#option-numberOfMonths">numberOfMonths</a></h3> |
|
1365 <dl> |
|
1366 <dt class="option-type-label">Type:</dt> |
|
1367 <dd class="option-type">Number, Array</dd> |
|
1368 |
|
1369 <dt class="option-default-label">Default:</dt> |
|
1370 <dd class="option-default">1</dd> |
|
1371 |
|
1372 </dl> |
|
1373 </div> |
|
1374 <div class="option-description"> |
|
1375 <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> |
|
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>numberOfMonths</code> option specified. |
|
1383 </dt> |
|
1384 <dd> |
|
1385 <pre><code>$( ".selector" ).datepicker({ numberOfMonths: [2, 3] });</code></pre> |
|
1386 </dd> |
|
1387 |
|
1388 |
|
1389 <dt> |
|
1390 Get or set the <code>numberOfMonths</code> option, after init. |
|
1391 </dt> |
|
1392 <dd> |
|
1393 <pre><code>//getter |
|
1394 var numberOfMonths = $( ".selector" ).datepicker( "option", "numberOfMonths" ); |
|
1395 //setter |
|
1396 $( ".selector" ).datepicker( "option", "numberOfMonths", [2, 3] );</code></pre> |
|
1397 </dd> |
|
1398 |
|
1399 </dl> |
|
1400 </div> |
|
1401 </li> |
|
1402 |
|
1403 |
|
1404 <li class="option" id="option-prevText"> |
|
1405 <div class="option-header"> |
|
1406 <h3 class="option-name"><a href="#option-prevText">prevText</a></h3> |
|
1407 <dl> |
|
1408 <dt class="option-type-label">Type:</dt> |
|
1409 <dd class="option-type">String</dd> |
|
1410 |
|
1411 <dt class="option-default-label">Default:</dt> |
|
1412 <dd class="option-default">'Prev'</dd> |
|
1413 |
|
1414 </dl> |
|
1415 </div> |
|
1416 <div class="option-description"> |
|
1417 <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> |
|
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>prevText</code> option specified. |
|
1425 </dt> |
|
1426 <dd> |
|
1427 <pre><code>$( ".selector" ).datepicker({ prevText: 'Earlier' });</code></pre> |
|
1428 </dd> |
|
1429 |
|
1430 |
|
1431 <dt> |
|
1432 Get or set the <code>prevText</code> option, after init. |
|
1433 </dt> |
|
1434 <dd> |
|
1435 <pre><code>//getter |
|
1436 var prevText = $( ".selector" ).datepicker( "option", "prevText" ); |
|
1437 //setter |
|
1438 $( ".selector" ).datepicker( "option", "prevText", 'Earlier' );</code></pre> |
|
1439 </dd> |
|
1440 |
|
1441 </dl> |
|
1442 </div> |
|
1443 </li> |
|
1444 |
|
1445 |
|
1446 <li class="option" id="option-selectOtherMonths"> |
|
1447 <div class="option-header"> |
|
1448 <h3 class="option-name"><a href="#option-selectOtherMonths">selectOtherMonths</a></h3> |
|
1449 <dl> |
|
1450 <dt class="option-type-label">Type:</dt> |
|
1451 <dd class="option-type">Boolean</dd> |
|
1452 |
|
1453 <dt class="option-default-label">Default:</dt> |
|
1454 <dd class="option-default">false</dd> |
|
1455 |
|
1456 </dl> |
|
1457 </div> |
|
1458 <div class="option-description"> |
|
1459 <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> |
|
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>selectOtherMonths</code> option specified. |
|
1467 </dt> |
|
1468 <dd> |
|
1469 <pre><code>$( ".selector" ).datepicker({ selectOtherMonths: true });</code></pre> |
|
1470 </dd> |
|
1471 |
|
1472 |
|
1473 <dt> |
|
1474 Get or set the <code>selectOtherMonths</code> option, after init. |
|
1475 </dt> |
|
1476 <dd> |
|
1477 <pre><code>//getter |
|
1478 var selectOtherMonths = $( ".selector" ).datepicker( "option", "selectOtherMonths" ); |
|
1479 //setter |
|
1480 $( ".selector" ).datepicker( "option", "selectOtherMonths", true );</code></pre> |
|
1481 </dd> |
|
1482 |
|
1483 </dl> |
|
1484 </div> |
|
1485 </li> |
|
1486 |
|
1487 |
|
1488 <li class="option" id="option-shortYearCutoff"> |
|
1489 <div class="option-header"> |
|
1490 <h3 class="option-name"><a href="#option-shortYearCutoff">shortYearCutoff</a></h3> |
|
1491 <dl> |
|
1492 <dt class="option-type-label">Type:</dt> |
|
1493 <dd class="option-type">String, Number</dd> |
|
1494 |
|
1495 <dt class="option-default-label">Default:</dt> |
|
1496 <dd class="option-default">'+10'</dd> |
|
1497 |
|
1498 </dl> |
|
1499 </div> |
|
1500 <div class="option-description"> |
|
1501 <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> |
|
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>shortYearCutoff</code> option specified. |
|
1509 </dt> |
|
1510 <dd> |
|
1511 <pre><code>$( ".selector" ).datepicker({ shortYearCutoff: 50 });</code></pre> |
|
1512 </dd> |
|
1513 |
|
1514 |
|
1515 <dt> |
|
1516 Get or set the <code>shortYearCutoff</code> option, after init. |
|
1517 </dt> |
|
1518 <dd> |
|
1519 <pre><code>//getter |
|
1520 var shortYearCutoff = $( ".selector" ).datepicker( "option", "shortYearCutoff" ); |
|
1521 //setter |
|
1522 $( ".selector" ).datepicker( "option", "shortYearCutoff", 50 );</code></pre> |
|
1523 </dd> |
|
1524 |
|
1525 </dl> |
|
1526 </div> |
|
1527 </li> |
|
1528 |
|
1529 |
|
1530 <li class="option" id="option-showAnim"> |
|
1531 <div class="option-header"> |
|
1532 <h3 class="option-name"><a href="#option-showAnim">showAnim</a></h3> |
|
1533 <dl> |
|
1534 <dt class="option-type-label">Type:</dt> |
|
1535 <dd class="option-type">String</dd> |
|
1536 |
|
1537 <dt class="option-default-label">Default:</dt> |
|
1538 <dd class="option-default">'show'</dd> |
|
1539 |
|
1540 </dl> |
|
1541 </div> |
|
1542 <div class="option-description"> |
|
1543 <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> |
|
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>showAnim</code> option specified. |
|
1551 </dt> |
|
1552 <dd> |
|
1553 <pre><code>$( ".selector" ).datepicker({ showAnim: 'fold' });</code></pre> |
|
1554 </dd> |
|
1555 |
|
1556 |
|
1557 <dt> |
|
1558 Get or set the <code>showAnim</code> option, after init. |
|
1559 </dt> |
|
1560 <dd> |
|
1561 <pre><code>//getter |
|
1562 var showAnim = $( ".selector" ).datepicker( "option", "showAnim" ); |
|
1563 //setter |
|
1564 $( ".selector" ).datepicker( "option", "showAnim", 'fold' );</code></pre> |
|
1565 </dd> |
|
1566 |
|
1567 </dl> |
|
1568 </div> |
|
1569 </li> |
|
1570 |
|
1571 |
|
1572 <li class="option" id="option-showButtonPanel"> |
|
1573 <div class="option-header"> |
|
1574 <h3 class="option-name"><a href="#option-showButtonPanel">showButtonPanel</a></h3> |
|
1575 <dl> |
|
1576 <dt class="option-type-label">Type:</dt> |
|
1577 <dd class="option-type">Boolean</dd> |
|
1578 |
|
1579 <dt class="option-default-label">Default:</dt> |
|
1580 <dd class="option-default">false</dd> |
|
1581 |
|
1582 </dl> |
|
1583 </div> |
|
1584 <div class="option-description"> |
|
1585 <p>Whether to show the button panel.</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>showButtonPanel</code> option specified. |
|
1593 </dt> |
|
1594 <dd> |
|
1595 <pre><code>$( ".selector" ).datepicker({ showButtonPanel: true });</code></pre> |
|
1596 </dd> |
|
1597 |
|
1598 |
|
1599 <dt> |
|
1600 Get or set the <code>showButtonPanel</code> option, after init. |
|
1601 </dt> |
|
1602 <dd> |
|
1603 <pre><code>//getter |
|
1604 var showButtonPanel = $( ".selector" ).datepicker( "option", "showButtonPanel" ); |
|
1605 //setter |
|
1606 $( ".selector" ).datepicker( "option", "showButtonPanel", true );</code></pre> |
|
1607 </dd> |
|
1608 |
|
1609 </dl> |
|
1610 </div> |
|
1611 </li> |
|
1612 |
|
1613 |
|
1614 <li class="option" id="option-showCurrentAtPos"> |
|
1615 <div class="option-header"> |
|
1616 <h3 class="option-name"><a href="#option-showCurrentAtPos">showCurrentAtPos</a></h3> |
|
1617 <dl> |
|
1618 <dt class="option-type-label">Type:</dt> |
|
1619 <dd class="option-type">Number</dd> |
|
1620 |
|
1621 <dt class="option-default-label">Default:</dt> |
|
1622 <dd class="option-default">0</dd> |
|
1623 |
|
1624 </dl> |
|
1625 </div> |
|
1626 <div class="option-description"> |
|
1627 <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> |
|
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>showCurrentAtPos</code> option specified. |
|
1635 </dt> |
|
1636 <dd> |
|
1637 <pre><code>$( ".selector" ).datepicker({ showCurrentAtPos: 3 });</code></pre> |
|
1638 </dd> |
|
1639 |
|
1640 |
|
1641 <dt> |
|
1642 Get or set the <code>showCurrentAtPos</code> option, after init. |
|
1643 </dt> |
|
1644 <dd> |
|
1645 <pre><code>//getter |
|
1646 var showCurrentAtPos = $( ".selector" ).datepicker( "option", "showCurrentAtPos" ); |
|
1647 //setter |
|
1648 $( ".selector" ).datepicker( "option", "showCurrentAtPos", 3 );</code></pre> |
|
1649 </dd> |
|
1650 |
|
1651 </dl> |
|
1652 </div> |
|
1653 </li> |
|
1654 |
|
1655 |
|
1656 <li class="option" id="option-showMonthAfterYear"> |
|
1657 <div class="option-header"> |
|
1658 <h3 class="option-name"><a href="#option-showMonthAfterYear">showMonthAfterYear</a></h3> |
|
1659 <dl> |
|
1660 <dt class="option-type-label">Type:</dt> |
|
1661 <dd class="option-type">Boolean</dd> |
|
1662 |
|
1663 <dt class="option-default-label">Default:</dt> |
|
1664 <dd class="option-default">false</dd> |
|
1665 |
|
1666 </dl> |
|
1667 </div> |
|
1668 <div class="option-description"> |
|
1669 <p>Whether to show the month after the year in the header.</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>showMonthAfterYear</code> option specified. |
|
1677 </dt> |
|
1678 <dd> |
|
1679 <pre><code>$( ".selector" ).datepicker({ showMonthAfterYear: true });</code></pre> |
|
1680 </dd> |
|
1681 |
|
1682 |
|
1683 <dt> |
|
1684 Get or set the <code>showMonthAfterYear</code> option, after init. |
|
1685 </dt> |
|
1686 <dd> |
|
1687 <pre><code>//getter |
|
1688 var showMonthAfterYear = $( ".selector" ).datepicker( "option", "showMonthAfterYear" ); |
|
1689 //setter |
|
1690 $( ".selector" ).datepicker( "option", "showMonthAfterYear", true );</code></pre> |
|
1691 </dd> |
|
1692 |
|
1693 </dl> |
|
1694 </div> |
|
1695 </li> |
|
1696 |
|
1697 |
|
1698 <li class="option" id="option-showOn"> |
|
1699 <div class="option-header"> |
|
1700 <h3 class="option-name"><a href="#option-showOn">showOn</a></h3> |
|
1701 <dl> |
|
1702 <dt class="option-type-label">Type:</dt> |
|
1703 <dd class="option-type">String</dd> |
|
1704 |
|
1705 <dt class="option-default-label">Default:</dt> |
|
1706 <dd class="option-default">'focus'</dd> |
|
1707 |
|
1708 </dl> |
|
1709 </div> |
|
1710 <div class="option-description"> |
|
1711 <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> |
|
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>showOn</code> option specified. |
|
1719 </dt> |
|
1720 <dd> |
|
1721 <pre><code>$( ".selector" ).datepicker({ showOn: 'both' });</code></pre> |
|
1722 </dd> |
|
1723 |
|
1724 |
|
1725 <dt> |
|
1726 Get or set the <code>showOn</code> option, after init. |
|
1727 </dt> |
|
1728 <dd> |
|
1729 <pre><code>//getter |
|
1730 var showOn = $( ".selector" ).datepicker( "option", "showOn" ); |
|
1731 //setter |
|
1732 $( ".selector" ).datepicker( "option", "showOn", 'both' );</code></pre> |
|
1733 </dd> |
|
1734 |
|
1735 </dl> |
|
1736 </div> |
|
1737 </li> |
|
1738 |
|
1739 |
|
1740 <li class="option" id="option-showOptions"> |
|
1741 <div class="option-header"> |
|
1742 <h3 class="option-name"><a href="#option-showOptions">showOptions</a></h3> |
|
1743 <dl> |
|
1744 <dt class="option-type-label">Type:</dt> |
|
1745 <dd class="option-type">Options</dd> |
|
1746 |
|
1747 <dt class="option-default-label">Default:</dt> |
|
1748 <dd class="option-default">{}</dd> |
|
1749 |
|
1750 </dl> |
|
1751 </div> |
|
1752 <div class="option-description"> |
|
1753 <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> |
|
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>showOptions</code> option specified. |
|
1761 </dt> |
|
1762 <dd> |
|
1763 <pre><code>$( ".selector" ).datepicker({ showOptions: {direction: 'up' });</code></pre> |
|
1764 </dd> |
|
1765 |
|
1766 |
|
1767 <dt> |
|
1768 Get or set the <code>showOptions</code> option, after init. |
|
1769 </dt> |
|
1770 <dd> |
|
1771 <pre><code>//getter |
|
1772 var showOptions = $( ".selector" ).datepicker( "option", "showOptions" ); |
|
1773 //setter |
|
1774 $( ".selector" ).datepicker( "option", "showOptions", {direction: 'up' );</code></pre> |
|
1775 </dd> |
|
1776 |
|
1777 </dl> |
|
1778 </div> |
|
1779 </li> |
|
1780 |
|
1781 |
|
1782 <li class="option" id="option-showOtherMonths"> |
|
1783 <div class="option-header"> |
|
1784 <h3 class="option-name"><a href="#option-showOtherMonths">showOtherMonths</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>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> |
|
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>showOtherMonths</code> option specified. |
|
1803 </dt> |
|
1804 <dd> |
|
1805 <pre><code>$( ".selector" ).datepicker({ showOtherMonths: true });</code></pre> |
|
1806 </dd> |
|
1807 |
|
1808 |
|
1809 <dt> |
|
1810 Get or set the <code>showOtherMonths</code> option, after init. |
|
1811 </dt> |
|
1812 <dd> |
|
1813 <pre><code>//getter |
|
1814 var showOtherMonths = $( ".selector" ).datepicker( "option", "showOtherMonths" ); |
|
1815 //setter |
|
1816 $( ".selector" ).datepicker( "option", "showOtherMonths", true );</code></pre> |
|
1817 </dd> |
|
1818 |
|
1819 </dl> |
|
1820 </div> |
|
1821 </li> |
|
1822 |
|
1823 |
|
1824 <li class="option" id="option-showWeek"> |
|
1825 <div class="option-header"> |
|
1826 <h3 class="option-name"><a href="#option-showWeek">showWeek</a></h3> |
|
1827 <dl> |
|
1828 <dt class="option-type-label">Type:</dt> |
|
1829 <dd class="option-type">Boolean</dd> |
|
1830 |
|
1831 <dt class="option-default-label">Default:</dt> |
|
1832 <dd class="option-default">false</dd> |
|
1833 |
|
1834 </dl> |
|
1835 </div> |
|
1836 <div class="option-description"> |
|
1837 <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> |
|
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>showWeek</code> option specified. |
|
1845 </dt> |
|
1846 <dd> |
|
1847 <pre><code>$( ".selector" ).datepicker({ showWeek: true });</code></pre> |
|
1848 </dd> |
|
1849 |
|
1850 |
|
1851 <dt> |
|
1852 Get or set the <code>showWeek</code> option, after init. |
|
1853 </dt> |
|
1854 <dd> |
|
1855 <pre><code>//getter |
|
1856 var showWeek = $( ".selector" ).datepicker( "option", "showWeek" ); |
|
1857 //setter |
|
1858 $( ".selector" ).datepicker( "option", "showWeek", true );</code></pre> |
|
1859 </dd> |
|
1860 |
|
1861 </dl> |
|
1862 </div> |
|
1863 </li> |
|
1864 |
|
1865 |
|
1866 <li class="option" id="option-stepMonths"> |
|
1867 <div class="option-header"> |
|
1868 <h3 class="option-name"><a href="#option-stepMonths">stepMonths</a></h3> |
|
1869 <dl> |
|
1870 <dt class="option-type-label">Type:</dt> |
|
1871 <dd class="option-type">Number</dd> |
|
1872 |
|
1873 <dt class="option-default-label">Default:</dt> |
|
1874 <dd class="option-default">1</dd> |
|
1875 |
|
1876 </dl> |
|
1877 </div> |
|
1878 <div class="option-description"> |
|
1879 <p>Set how many months to move when clicking the Previous/Next links.</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>stepMonths</code> option specified. |
|
1887 </dt> |
|
1888 <dd> |
|
1889 <pre><code>$( ".selector" ).datepicker({ stepMonths: 3 });</code></pre> |
|
1890 </dd> |
|
1891 |
|
1892 |
|
1893 <dt> |
|
1894 Get or set the <code>stepMonths</code> option, after init. |
|
1895 </dt> |
|
1896 <dd> |
|
1897 <pre><code>//getter |
|
1898 var stepMonths = $( ".selector" ).datepicker( "option", "stepMonths" ); |
|
1899 //setter |
|
1900 $( ".selector" ).datepicker( "option", "stepMonths", 3 );</code></pre> |
|
1901 </dd> |
|
1902 |
|
1903 </dl> |
|
1904 </div> |
|
1905 </li> |
|
1906 |
|
1907 |
|
1908 <li class="option" id="option-weekHeader"> |
|
1909 <div class="option-header"> |
|
1910 <h3 class="option-name"><a href="#option-weekHeader">weekHeader</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">'Wk'</dd> |
|
1917 |
|
1918 </dl> |
|
1919 </div> |
|
1920 <div class="option-description"> |
|
1921 <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> |
|
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>weekHeader</code> option specified. |
|
1929 </dt> |
|
1930 <dd> |
|
1931 <pre><code>$( ".selector" ).datepicker({ weekHeader: 'W' });</code></pre> |
|
1932 </dd> |
|
1933 |
|
1934 |
|
1935 <dt> |
|
1936 Get or set the <code>weekHeader</code> option, after init. |
|
1937 </dt> |
|
1938 <dd> |
|
1939 <pre><code>//getter |
|
1940 var weekHeader = $( ".selector" ).datepicker( "option", "weekHeader" ); |
|
1941 //setter |
|
1942 $( ".selector" ).datepicker( "option", "weekHeader", 'W' );</code></pre> |
|
1943 </dd> |
|
1944 |
|
1945 </dl> |
|
1946 </div> |
|
1947 </li> |
|
1948 |
|
1949 |
|
1950 <li class="option" id="option-yearRange"> |
|
1951 <div class="option-header"> |
|
1952 <h3 class="option-name"><a href="#option-yearRange">yearRange</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">'c-10:c+10'</dd> |
|
1959 |
|
1960 </dl> |
|
1961 </div> |
|
1962 <div class="option-description"> |
|
1963 <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> |
|
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>yearRange</code> option specified. |
|
1971 </dt> |
|
1972 <dd> |
|
1973 <pre><code>$( ".selector" ).datepicker({ yearRange: '2000:2010' });</code></pre> |
|
1974 </dd> |
|
1975 |
|
1976 |
|
1977 <dt> |
|
1978 Get or set the <code>yearRange</code> option, after init. |
|
1979 </dt> |
|
1980 <dd> |
|
1981 <pre><code>//getter |
|
1982 var yearRange = $( ".selector" ).datepicker( "option", "yearRange" ); |
|
1983 //setter |
|
1984 $( ".selector" ).datepicker( "option", "yearRange", '2000:2010' );</code></pre> |
|
1985 </dd> |
|
1986 |
|
1987 </dl> |
|
1988 </div> |
|
1989 </li> |
|
1990 |
|
1991 |
|
1992 <li class="option" id="option-yearSuffix"> |
|
1993 <div class="option-header"> |
|
1994 <h3 class="option-name"><a href="#option-yearSuffix">yearSuffix</a></h3> |
|
1995 <dl> |
|
1996 <dt class="option-type-label">Type:</dt> |
|
1997 <dd class="option-type">String</dd> |
|
1998 |
|
1999 <dt class="option-default-label">Default:</dt> |
|
2000 <dd class="option-default">''</dd> |
|
2001 |
|
2002 </dl> |
|
2003 </div> |
|
2004 <div class="option-description"> |
|
2005 <p>Additional text to display after the year in the month headers. This attribute is one of the regionalisation attributes.</p> |
|
2006 </div> |
|
2007 <div class="option-examples"> |
|
2008 <h4>Code examples</h4> |
|
2009 <dl class="option-examples-list"> |
|
2010 |
|
2011 <dt> |
|
2012 Initialize a datepicker with the <code>yearSuffix</code> option specified. |
|
2013 </dt> |
|
2014 <dd> |
|
2015 <pre><code>$( ".selector" ).datepicker({ yearSuffix: 'CE' });</code></pre> |
|
2016 </dd> |
|
2017 |
|
2018 |
|
2019 <dt> |
|
2020 Get or set the <code>yearSuffix</code> option, after init. |
|
2021 </dt> |
|
2022 <dd> |
|
2023 <pre><code>//getter |
|
2024 var yearSuffix = $( ".selector" ).datepicker( "option", "yearSuffix" ); |
|
2025 //setter |
|
2026 $( ".selector" ).datepicker( "option", "yearSuffix", 'CE' );</code></pre> |
|
2027 </dd> |
|
2028 |
|
2029 </dl> |
|
2030 </div> |
|
2031 </li> |
|
2032 |
|
2033 </ul> |
|
2034 </div> |
|
2035 <div id="events"> |
|
2036 <h2 class="top-header">Events</h2> |
|
2037 <ul class="events-list"> |
|
2038 |
|
2039 <li class="event" id="event-beforeShow"> |
|
2040 <div class="event-header"> |
|
2041 <h3 class="event-name"><a href="#event-beforeShow">beforeShow</a></h3> |
|
2042 <dl> |
|
2043 <dt class="event-type-label"></dt> |
|
2044 <dd class="event-type">function(input, inst)</dd> |
|
2045 </dl> |
|
2046 </div> |
|
2047 <div class="event-description"> |
|
2048 <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> |
|
2049 </div> |
|
2050 <div class="event-examples"> |
|
2051 <h4>Code examples</h4> |
|
2052 <dl class="event-examples-list"> |
|
2053 |
|
2054 <dt> |
|
2055 Supply a callback function to handle the <code>beforeShow</code> event as an init option. |
|
2056 </dt> |
|
2057 <dd> |
|
2058 <pre><code>$('.selector').datepicker({ |
|
2059 beforeShow: function(input, inst) { ... } |
|
2060 });</code></pre> |
|
2061 </dd> |
|
2062 |
|
2063 </dl> |
|
2064 </div> |
|
2065 </li> |
|
2066 |
|
2067 |
|
2068 <li class="event" id="event-beforeShowDay"> |
|
2069 <div class="event-header"> |
|
2070 <h3 class="event-name"><a href="#event-beforeShowDay">beforeShowDay</a></h3> |
|
2071 <dl> |
|
2072 <dt class="event-type-label"></dt> |
|
2073 <dd class="event-type">function(date)</dd> |
|
2074 </dl> |
|
2075 </div> |
|
2076 <div class="event-description"> |
|
2077 <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> |
|
2078 </div> |
|
2079 <div class="event-examples"> |
|
2080 <h4>Code examples</h4> |
|
2081 <dl class="event-examples-list"> |
|
2082 |
|
2083 <dt> |
|
2084 Supply a callback function to handle the <code>beforeShowDay</code> event as an init option. |
|
2085 </dt> |
|
2086 <dd> |
|
2087 <pre><code>$('.selector').datepicker({ |
|
2088 beforeShowDay: function(date) { ... } |
|
2089 });</code></pre> |
|
2090 </dd> |
|
2091 |
|
2092 </dl> |
|
2093 </div> |
|
2094 </li> |
|
2095 |
|
2096 |
|
2097 <li class="event" id="event-onChangeMonthYear"> |
|
2098 <div class="event-header"> |
|
2099 <h3 class="event-name"><a href="#event-onChangeMonthYear">onChangeMonthYear</a></h3> |
|
2100 <dl> |
|
2101 <dt class="event-type-label"></dt> |
|
2102 <dd class="event-type">function(year, month, inst)</dd> |
|
2103 </dl> |
|
2104 </div> |
|
2105 <div class="event-description"> |
|
2106 <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> |
|
2107 </div> |
|
2108 <div class="event-examples"> |
|
2109 <h4>Code examples</h4> |
|
2110 <dl class="event-examples-list"> |
|
2111 |
|
2112 <dt> |
|
2113 Supply a callback function to handle the <code>onChangeMonthYear</code> event as an init option. |
|
2114 </dt> |
|
2115 <dd> |
|
2116 <pre><code>$('.selector').datepicker({ |
|
2117 onChangeMonthYear: function(year, month, inst) { ... } |
|
2118 });</code></pre> |
|
2119 </dd> |
|
2120 |
|
2121 </dl> |
|
2122 </div> |
|
2123 </li> |
|
2124 |
|
2125 |
|
2126 <li class="event" id="event-onClose"> |
|
2127 <div class="event-header"> |
|
2128 <h3 class="event-name"><a href="#event-onClose">onClose</a></h3> |
|
2129 <dl> |
|
2130 <dt class="event-type-label"></dt> |
|
2131 <dd class="event-type">function(dateText, inst)</dd> |
|
2132 </dl> |
|
2133 </div> |
|
2134 <div class="event-description"> |
|
2135 <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> |
|
2136 </div> |
|
2137 <div class="event-examples"> |
|
2138 <h4>Code examples</h4> |
|
2139 <dl class="event-examples-list"> |
|
2140 |
|
2141 <dt> |
|
2142 Supply a callback function to handle the <code>onClose</code> event as an init option. |
|
2143 </dt> |
|
2144 <dd> |
|
2145 <pre><code>$('.selector').datepicker({ |
|
2146 onClose: function(dateText, inst) { ... } |
|
2147 });</code></pre> |
|
2148 </dd> |
|
2149 |
|
2150 </dl> |
|
2151 </div> |
|
2152 </li> |
|
2153 |
|
2154 |
|
2155 <li class="event" id="event-onSelect"> |
|
2156 <div class="event-header"> |
|
2157 <h3 class="event-name"><a href="#event-onSelect">onSelect</a></h3> |
|
2158 <dl> |
|
2159 <dt class="event-type-label"></dt> |
|
2160 <dd class="event-type">function(dateText, inst)</dd> |
|
2161 </dl> |
|
2162 </div> |
|
2163 <div class="event-description"> |
|
2164 <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> |
|
2165 </div> |
|
2166 <div class="event-examples"> |
|
2167 <h4>Code examples</h4> |
|
2168 <dl class="event-examples-list"> |
|
2169 |
|
2170 <dt> |
|
2171 Supply a callback function to handle the <code>onSelect</code> event as an init option. |
|
2172 </dt> |
|
2173 <dd> |
|
2174 <pre><code>$('.selector').datepicker({ |
|
2175 onSelect: function(dateText, inst) { ... } |
|
2176 });</code></pre> |
|
2177 </dd> |
|
2178 |
|
2179 </dl> |
|
2180 </div> |
|
2181 </li> |
|
2182 |
|
2183 </ul> |
|
2184 </div> |
|
2185 <div id="methods"> |
|
2186 <h2 class="top-header">Methods</h2> |
|
2187 <ul class="methods-list"> |
|
2188 |
|
2189 <li class="method" id="method-destroy"> |
|
2190 <div class="method-header"> |
|
2191 <h3 class="method-name"><a href="#method-destroy">destroy</a></h3> |
|
2192 <dl> |
|
2193 <dt class="method-signature-label">Signature:</dt> |
|
2194 <dd class="method-signature">.datepicker( "destroy" |
|
2195 |
|
2196 |
|
2197 |
|
2198 |
|
2199 |
|
2200 |
|
2201 |
|
2202 )</dd> |
|
2203 </dl> |
|
2204 </div> |
|
2205 <div class="method-description"> |
|
2206 <p>Remove the datepicker functionality completely. This will return the element back to its pre-init state.</p> |
|
2207 </div> |
|
2208 </li> |
|
2209 |
|
2210 |
|
2211 <li class="method" id="method-disable"> |
|
2212 <div class="method-header"> |
|
2213 <h3 class="method-name"><a href="#method-disable">disable</a></h3> |
|
2214 <dl> |
|
2215 <dt class="method-signature-label">Signature:</dt> |
|
2216 <dd class="method-signature">.datepicker( "disable" |
|
2217 |
|
2218 |
|
2219 |
|
2220 |
|
2221 |
|
2222 |
|
2223 |
|
2224 )</dd> |
|
2225 </dl> |
|
2226 </div> |
|
2227 <div class="method-description"> |
|
2228 <p>Disable the datepicker.</p> |
|
2229 </div> |
|
2230 </li> |
|
2231 |
|
2232 |
|
2233 <li class="method" id="method-enable"> |
|
2234 <div class="method-header"> |
|
2235 <h3 class="method-name"><a href="#method-enable">enable</a></h3> |
|
2236 <dl> |
|
2237 <dt class="method-signature-label">Signature:</dt> |
|
2238 <dd class="method-signature">.datepicker( "enable" |
|
2239 |
|
2240 |
|
2241 |
|
2242 |
|
2243 |
|
2244 |
|
2245 |
|
2246 )</dd> |
|
2247 </dl> |
|
2248 </div> |
|
2249 <div class="method-description"> |
|
2250 <p>Enable the datepicker.</p> |
|
2251 </div> |
|
2252 </li> |
|
2253 |
|
2254 |
|
2255 <li class="method" id="method-option"> |
|
2256 <div class="method-header"> |
|
2257 <h3 class="method-name"><a href="#method-option">option</a></h3> |
|
2258 <dl> |
|
2259 <dt class="method-signature-label">Signature:</dt> |
|
2260 <dd class="method-signature">.datepicker( "option" |
|
2261 |
|
2262 , optionName |
|
2263 |
|
2264 , <span class="optional">[</span>value<span class="optional">] </span> |
|
2265 |
|
2266 |
|
2267 |
|
2268 )</dd> |
|
2269 </dl> |
|
2270 </div> |
|
2271 <div class="method-description"> |
|
2272 <p>Get or set any datepicker option. If no value is specified, will act as a getter.</p> |
|
2273 </div> |
|
2274 </li> |
|
2275 |
|
2276 |
|
2277 <li class="method" id="method-option"> |
|
2278 <div class="method-header"> |
|
2279 <h3 class="method-name"><a href="#method-option">option</a></h3> |
|
2280 <dl> |
|
2281 <dt class="method-signature-label">Signature:</dt> |
|
2282 <dd class="method-signature">.datepicker( "option" |
|
2283 |
|
2284 , options |
|
2285 |
|
2286 |
|
2287 |
|
2288 |
|
2289 |
|
2290 )</dd> |
|
2291 </dl> |
|
2292 </div> |
|
2293 <div class="method-description"> |
|
2294 <p>Set multiple datepicker options at once by providing an options object.</p> |
|
2295 </div> |
|
2296 </li> |
|
2297 |
|
2298 |
|
2299 <li class="method" id="method-widget"> |
|
2300 <div class="method-header"> |
|
2301 <h3 class="method-name"><a href="#method-widget">widget</a></h3> |
|
2302 <dl> |
|
2303 <dt class="method-signature-label">Signature:</dt> |
|
2304 <dd class="method-signature">.datepicker( "widget" |
|
2305 |
|
2306 |
|
2307 |
|
2308 |
|
2309 |
|
2310 |
|
2311 |
|
2312 )</dd> |
|
2313 </dl> |
|
2314 </div> |
|
2315 <div class="method-description"> |
|
2316 <p>Returns the .ui-datepicker element.</p> |
|
2317 </div> |
|
2318 </li> |
|
2319 |
|
2320 |
|
2321 <li class="method" id="method-dialog"> |
|
2322 <div class="method-header"> |
|
2323 <h3 class="method-name"><a href="#method-dialog">dialog</a></h3> |
|
2324 <dl> |
|
2325 <dt class="method-signature-label">Signature:</dt> |
|
2326 <dd class="method-signature">.datepicker( "dialog" |
|
2327 |
|
2328 , date |
|
2329 |
|
2330 , <span class="optional">[</span>onSelect<span class="optional">] </span> |
|
2331 |
|
2332 , <span class="optional">[</span>settings<span class="optional">] </span> |
|
2333 |
|
2334 , <span class="optional">[</span>pos<span class="optional">] </span>)</dd> |
|
2335 </dl> |
|
2336 </div> |
|
2337 <div class="method-description"> |
|
2338 <p>Open a datepicker in a "dialog" box. |
|
2339 </p><p>dateText: the initial date for the date picker as either a Date or a string in the current date format. |
|
2340 </p><p>onSelect: A callback function when a date is selected. The function receives the date text and date picker instance as parameters. |
|
2341 </p><p>settings: The new settings for the date picker. |
|
2342 </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> |
|
2343 </div> |
|
2344 </li> |
|
2345 |
|
2346 |
|
2347 <li class="method" id="method-isDisabled"> |
|
2348 <div class="method-header"> |
|
2349 <h3 class="method-name"><a href="#method-isDisabled">isDisabled</a></h3> |
|
2350 <dl> |
|
2351 <dt class="method-signature-label">Signature:</dt> |
|
2352 <dd class="method-signature">.datepicker( "isDisabled" |
|
2353 |
|
2354 |
|
2355 |
|
2356 |
|
2357 |
|
2358 |
|
2359 |
|
2360 )</dd> |
|
2361 </dl> |
|
2362 </div> |
|
2363 <div class="method-description"> |
|
2364 <p>Determine whether a date picker has been disabled.</p> |
|
2365 </div> |
|
2366 </li> |
|
2367 |
|
2368 |
|
2369 <li class="method" id="method-hide"> |
|
2370 <div class="method-header"> |
|
2371 <h3 class="method-name"><a href="#method-hide">hide</a></h3> |
|
2372 <dl> |
|
2373 <dt class="method-signature-label">Signature:</dt> |
|
2374 <dd class="method-signature">.datepicker( "hide" |
|
2375 |
|
2376 , <span class="optional">[</span>speed<span class="optional">] </span> |
|
2377 |
|
2378 |
|
2379 |
|
2380 |
|
2381 |
|
2382 )</dd> |
|
2383 </dl> |
|
2384 </div> |
|
2385 <div class="method-description"> |
|
2386 <p>Close a previously opened date picker. |
|
2387 </p><p>speed: The speed at which to close the date picker.</p> |
|
2388 </div> |
|
2389 </li> |
|
2390 |
|
2391 |
|
2392 <li class="method" id="method-show"> |
|
2393 <div class="method-header"> |
|
2394 <h3 class="method-name"><a href="#method-show">show</a></h3> |
|
2395 <dl> |
|
2396 <dt class="method-signature-label">Signature:</dt> |
|
2397 <dd class="method-signature">.datepicker( "show" |
|
2398 |
|
2399 |
|
2400 |
|
2401 |
|
2402 |
|
2403 |
|
2404 |
|
2405 )</dd> |
|
2406 </dl> |
|
2407 </div> |
|
2408 <div class="method-description"> |
|
2409 <p>Call up a previously attached date picker.</p> |
|
2410 </div> |
|
2411 </li> |
|
2412 |
|
2413 |
|
2414 <li class="method" id="method-getDate"> |
|
2415 <div class="method-header"> |
|
2416 <h3 class="method-name"><a href="#method-getDate">getDate</a></h3> |
|
2417 <dl> |
|
2418 <dt class="method-signature-label">Signature:</dt> |
|
2419 <dd class="method-signature">.datepicker( "getDate" |
|
2420 |
|
2421 |
|
2422 |
|
2423 |
|
2424 |
|
2425 |
|
2426 |
|
2427 )</dd> |
|
2428 </dl> |
|
2429 </div> |
|
2430 <div class="method-description"> |
|
2431 <p>Returns the current date for the datepicker or null if no date has been selected.</p> |
|
2432 </div> |
|
2433 </li> |
|
2434 |
|
2435 |
|
2436 <li class="method" id="method-setDate"> |
|
2437 <div class="method-header"> |
|
2438 <h3 class="method-name"><a href="#method-setDate">setDate</a></h3> |
|
2439 <dl> |
|
2440 <dt class="method-signature-label">Signature:</dt> |
|
2441 <dd class="method-signature">.datepicker( "setDate" |
|
2442 |
|
2443 , date |
|
2444 |
|
2445 |
|
2446 |
|
2447 |
|
2448 |
|
2449 )</dd> |
|
2450 </dl> |
|
2451 </div> |
|
2452 <div class="method-description"> |
|
2453 <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> |
|
2454 </div> |
|
2455 </li> |
|
2456 |
|
2457 </ul> |
|
2458 </div> |
|
2459 <div id="theming"> |
|
2460 <h2 class="top-header">Theming</h2> |
|
2461 <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. |
|
2462 </p> |
|
2463 <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. |
|
2464 </p> |
|
2465 |
|
2466 <h3>Sample markup with jQuery UI CSS Framework classes</h3> |
|
2467 <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 /> |
|
2468 <div class="<strong>ui-datepicker-header</strong> ui-widget-header ui-helper-clearfix ui-corner-all"><br /> |
|
2469 <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 /> |
|
2470 <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 /> |
|
2471 <div class="<strong>ui-datepicker-title</strong>"><br /> |
|
2472 <span class="<strong>ui-datepicker-month</strong>">January</span><span class="<strong>ui-datepicker-year</strong>">2009</span><br /> |
|
2473 </div><br /> |
|
2474 </div><br /> |
|
2475 <table class="<strong>ui-datepicker-calendar</strong>"><br /> |
|
2476 <thead><br /> |
|
2477 <tr><br /> |
|
2478 <th class="<strong>ui-datepicker-week-end</strong>"><span title="Sunday">Su</span></th><br /> |
|
2479 ...<br /> |
|
2480 </tr><br /> |
|
2481 </thead><br /> |
|
2482 <tbody><tr><br /> |
|
2483 <td class="<strong>ui-datepicker-week-end ui-datepicker-other-month</strong> "> 1 </td><br /> |
|
2484 ...<br /> |
|
2485 </tr><br /> |
|
2486 </tbody><br /> |
|
2487 </table><br /> |
|
2488 <div class="<strong>ui-datepicker-buttonpane</strong> ui-widget-content"><br /> |
|
2489 <button type="button" class="<strong>ui-datepicker-current</strong> ui-state-default ui-priority-secondary ui-corner-all">Today</button><br /> |
|
2490 <button type="button" class="<strong>ui-datepicker-close</strong> ui-state-default ui-priority-primary ui-corner-all">Done</button><br /> |
|
2491 </div><br /> |
|
2492 </div><br /> |
|
2493 <p class="theme-note"> |
|
2494 <strong> |
|
2495 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>. |
|
2496 </strong> |
|
2497 </p> |
|
2498 |
|
2499 </div> |
|
2500 </div> |
|
2501 |
|
2502 </p><!-- |
|
2503 Pre-expand include size: 96078 bytes |
|
2504 Post-expand include size: 188891 bytes |
|
2505 Template argument size: 118081 bytes |
|
2506 Maximum: 2097152 bytes |
|
2507 --> |
|
2508 |
|
2509 <!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3774-1!1!0!!en!2 and timestamp 20100421060818 --> |
|