|
26 | 26 |
|
27 | 27 | <h3 id="utility-functions">Utility functions</h3>
|
28 | 28 |
|
29 |
| - <h4>$.datepicker.setDefaults( settings )</h4> |
| 29 | + <h4 id="utility-setDefaults">$.datepicker.setDefaults( settings )</h4> |
30 | 30 | <p>Change the default settings for all date pickers.</p>
|
31 | 31 | <p>Use the <a href="#method-option"><code>option()</code></a> method to change settings for individual instances.</p>
|
32 | 32 | <div>
|
|
46 | 46 | </code></pre>
|
47 | 47 | </div>
|
48 | 48 |
|
49 |
| - <h4>$.datepicker.formatDate( format, date, settings )</h4> |
| 49 | + <h4 id="utility-formatDate">$.datepicker.formatDate( format, date, settings )</h4> |
50 | 50 | <p>Format a date into a string value with a specified format.</p>
|
51 | 51 | <p>The format can be combinations of the following:</p>
|
52 | 52 | <ul>
|
|
100 | 100 | </code></pre>
|
101 | 101 | </div>
|
102 | 102 |
|
103 |
| - <h4>$.datepicker.parseDate( format, value, settings )</h4> |
| 103 | + <h4 id="utility-parseDate">$.datepicker.parseDate( format, value, settings )</h4> |
104 | 104 | <p>Extract a date from a string value with a specified format.</p>
|
105 | 105 | <p>The format can be combinations of the following:</p>
|
106 | 106 | <ul>
|
|
148 | 148 | </code></pre>
|
149 | 149 | </div>
|
150 | 150 |
|
151 |
| - <h4>$.datepicker.iso8601Week( date )</h4> |
| 151 | + <h4 id="utility-iso8601Week">$.datepicker.iso8601Week( date )</h4> |
152 | 152 | <p>Determine the week of the year for a given date: 1 to 53.</p>
|
153 | 153 | <p>This function uses the ISO 8601 definition of a week: weeks start on a Monday and the first week of the year contains January 4. This means that up to three days from the previous year may be included in the of first week of the current year, and that up to three days from the current year may be included in the last week of the previous year.</p>
|
154 | 154 | <p>This function is the default implementation for the <a href="#option-calculateWeek"><code>calculateWeek</code></a> option.</p>
|
|
160 | 160 | </code></pre>
|
161 | 161 | </div>
|
162 | 162 |
|
163 |
| - <h4>$.datepicker.noWeekends</h4> |
| 163 | + <h4 id="utility-noWeekends">$.datepicker.noWeekends</h4> |
164 | 164 | <p>Set as beforeShowDay function to prevent selection of weekends.</p>
|
165 | 165 | <p>We can provide the <code>noWeekends()</code> function into the <a href="#option-beforeShowDay"><code>beforeShowDay</code></a> option which will calculate all the weekdays and provide an array of <code>true</code>/<code>false</code> values indicating whether a date is selectable.</p>
|
166 | 166 | <div>
|
|
198 | 198 | <type name="Element"/>
|
199 | 199 | </option>
|
200 | 200 | <option name="altFormat" type="String" default='""' example-value='"yy-mm-dd"'>
|
201 |
| - <desc>The <a href="#option-dateFormat"><code>dateFormat</code></a> to be used for the <a href="#option-altField"><code>altField</code></a> 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 [[UI/Datepicker/formatDate|formatDate]] function</desc> |
| 201 | + <desc>The <a href="#option-dateFormat"><code>dateFormat</code></a> to be used for the <a href="#option-altField"><code>altField</code></a> 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="#utility-formatDate"><code>formatDate</code></a> function</desc> |
202 | 202 | </option>
|
203 | 203 | <option name="appendText" type="String" default='""' example-value='"(yyyy-mm-dd)"'>
|
204 | 204 | <desc>The text to display after each date field, e.g., to show the required format.</desc>
|
|
234 | 234 | <desc>The text to display for the current day link. Use the <a href="#option-showButtonPanel"><code>showButtonPanel</code></a> option to display this button.</desc>
|
235 | 235 | </option>
|
236 | 236 | <option name="dateFormat" type="String" default='"mm/dd/yy"' example-value='"yy-mm-dd"'>
|
237 |
| - <desc>The format for parsed and displayed dates. For a full list of the possible formats see the <code>[[UI/Datepicker/formatDate|formatDate]]</code> function.</desc> |
| 237 | + <desc>The format for parsed and displayed dates. For a full list of the possible formats see the <code><a href="#utility-formatDate"><code>formatDate</code></a></code> function.</desc> |
238 | 238 | </option>
|
239 | 239 | <option name="dayNames" type="Array" default='[ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ]' example-value='[ "Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi" ]'>
|
240 | 240 | <desc>The list of long day names, starting from Sunday, for use as requested via the <a href="#option-dateFormat"><code>dateFormat</code></a> option.</desc>
|
|
246 | 246 | <desc>The list of abbreviated day names, starting from Sunday, for use as requested via the <a href="#option-dateFormat"><code>dateFormat</code></a> option.</desc>
|
247 | 247 | </option>
|
248 | 248 | <option name="defaultDate" default="null" example-value="+7">
|
249 |
| - <desc>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>[[UI/Datepicker#option-dateFormat|dateFormat]]</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.</desc> |
| 249 | + <desc>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 <a href="#option-dateFormat"><code>dateFormat</code></a>, 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.</desc> |
250 | 250 | <type name="Date">
|
251 | 251 | <desc>A date object containing the default date.</desc>
|
252 | 252 | </type>
|
|
305 | 305 | <desc>The list of abbreviated month names, as used in the month header on each datepicker and as requested via the <a href="#option-dateFormat"><code>dateFormat</code></a> option.</desc>
|
306 | 306 | </option>
|
307 | 307 | <option name="navigationAsDateFormat" type="Boolean" default="false" example-value="true">
|
308 |
| - <desc>Whether the <a href="#option-prevText"><code>prevText</code></a> and <a href="#option-nextText"><code>nextText</code></a> options should be parsed as dates by the <code>[[UI/Datepicker/formatDate|formatDate]]</code> function, allowing them to display the target month names for example.</desc> |
| 308 | + <desc>Whether the <a href="#option-prevText"><code>prevText</code></a> and <a href="#option-nextText"><code>nextText</code></a> options should be parsed as dates by the <code><a href="#utility-formatDate"><code>formatDate</code></a></code> function, allowing them to display the target month names for example.</desc> |
309 | 309 | </option>
|
310 | 310 | <option name="nextText" type="String" default='"Next"' example-value='"Later"'>
|
311 | 311 | <desc>The text to display for the next month link. With the standard ThemeRoller styling, this value is replaced by an icon.</desc>
|
|
326 | 326 | <desc>Whether days in other months shown before or after the current month are selectable. This only applies if the <a href="#option-showOtherMonths"><code>showOtherMonths</code></a> option is set to <code>true</code>.</desc>
|
327 | 327 | </option>
|
328 | 328 | <option name="shortYearCutoff" default='"+10"' example-value="50">
|
329 |
| - <desc>The cutoff year for determining the century for a date (used in conjunction with <code>[[UI/Datepicker#option-dateFormat|dateFormat]]</code> 'y'). Any dates entered with a year value less than or equal to the cutoff year are considered to be in the current century, while those greater than it are deemed to be in the previous century.</desc> |
| 329 | + <desc>The cutoff year for determining the century for a date (used in conjunction with <a href="#option-dateFormat"><code>dateFormat</code></a> 'y'). Any dates entered with a year value less than or equal to the cutoff year are considered to be in the current century, while those greater than it are deemed to be in the previous century.</desc> |
330 | 330 | <type name="Number">
|
331 | 331 | <desc>A value between <code>0</code> and <code>99</code> indicating the cutoff year.</desc>
|
332 | 332 | </type>
|
|
0 commit comments