{"id":22,"date":"2023-08-25T17:42:01","date_gmt":"2023-08-25T17:42:01","guid":{"rendered":"\/\/api.jqueryui.com\/1.8\/?p=22"},"modified":"2023-08-25T17:42:01","modified_gmt":"2023-08-25T17:42:01","slug":"datepicker","status":"publish","type":"post","link":"https:\/\/api.jqueryui.com\/1.8\/datepicker\/","title":{"rendered":"Datepicker Widget"},"content":{"rendered":"<article id=\"datepicker1\" class=\"entry widget\"><h2 class=\"section-title\">\n<span>Datepicker Widget<\/span><span class=\"version-details\">version added: 1.0<\/span>\n<\/h2>\n<div class=\"entry-wrapper\">\n<p class=\"desc\"><strong>Description: <\/strong>Select a date from a popup or inline calendar<\/p>\n<section id=\"quick-nav\"><header><h2>QuickNav<a href=\"#entry-examples\">Examples<\/a>\n<\/h2><\/header><div class=\"quick-nav-section\">\n<h3>Options<\/h3>\n<div><a href=\"#option-altField\">altField<\/a><\/div>\n<div><a href=\"#option-altFormat\">altFormat<\/a><\/div>\n<div><a href=\"#option-appendText\">appendText<\/a><\/div>\n<div><a href=\"#option-autoSize\">autoSize<\/a><\/div>\n<div><a href=\"#option-beforeShow\">beforeShow<\/a><\/div>\n<div><a href=\"#option-beforeShowDay\">beforeShowDay<\/a><\/div>\n<div><a href=\"#option-buttonImage\">buttonImage<\/a><\/div>\n<div><a href=\"#option-buttonImageOnly\">buttonImageOnly<\/a><\/div>\n<div><a href=\"#option-buttonText\">buttonText<\/a><\/div>\n<div><a href=\"#option-calculateWeek\">calculateWeek<\/a><\/div>\n<div><a href=\"#option-changeMonth\">changeMonth<\/a><\/div>\n<div><a href=\"#option-changeYear\">changeYear<\/a><\/div>\n<div><a href=\"#option-closeText\">closeText<\/a><\/div>\n<div><a href=\"#option-constrainInput\">constrainInput<\/a><\/div>\n<div><a href=\"#option-currentText\">currentText<\/a><\/div>\n<div><a href=\"#option-dateFormat\">dateFormat<\/a><\/div>\n<div><a href=\"#option-dayNames\">dayNames<\/a><\/div>\n<div><a href=\"#option-dayNamesMin\">dayNamesMin<\/a><\/div>\n<div><a href=\"#option-dayNamesShort\">dayNamesShort<\/a><\/div>\n<div><a href=\"#option-defaultDate\">defaultDate<\/a><\/div>\n<div><a href=\"#option-duration\">duration<\/a><\/div>\n<div><a href=\"#option-firstDay\">firstDay<\/a><\/div>\n<div><a href=\"#option-gotoCurrent\">gotoCurrent<\/a><\/div>\n<div><a href=\"#option-hideIfNoPrevNext\">hideIfNoPrevNext<\/a><\/div>\n<div><a href=\"#option-isRTL\">isRTL<\/a><\/div>\n<div><a href=\"#option-maxDate\">maxDate<\/a><\/div>\n<div><a href=\"#option-minDate\">minDate<\/a><\/div>\n<div><a href=\"#option-monthNames\">monthNames<\/a><\/div>\n<div><a href=\"#option-monthNamesShort\">monthNamesShort<\/a><\/div>\n<div><a href=\"#option-navigationAsDateFormat\">navigationAsDateFormat<\/a><\/div>\n<div><a href=\"#option-nextText\">nextText<\/a><\/div>\n<div><a href=\"#option-numberOfMonths\">numberOfMonths<\/a><\/div>\n<div><a href=\"#option-onChangeMonthYear\">onChangeMonthYear<\/a><\/div>\n<div><a href=\"#option-onClose\">onClose<\/a><\/div>\n<div><a href=\"#option-onSelect\">onSelect<\/a><\/div>\n<div><a href=\"#option-prevText\">prevText<\/a><\/div>\n<div><a href=\"#option-selectOtherMonths\">selectOtherMonths<\/a><\/div>\n<div><a href=\"#option-shortYearCutoff\">shortYearCutoff<\/a><\/div>\n<div><a href=\"#option-showAnim\">showAnim<\/a><\/div>\n<div><a href=\"#option-showButtonPanel\">showButtonPanel<\/a><\/div>\n<div><a href=\"#option-showCurrentAtPos\">showCurrentAtPos<\/a><\/div>\n<div><a href=\"#option-showMonthAfterYear\">showMonthAfterYear<\/a><\/div>\n<div><a href=\"#option-showOn\">showOn<\/a><\/div>\n<div><a href=\"#option-showOptions\">showOptions<\/a><\/div>\n<div><a href=\"#option-showOtherMonths\">showOtherMonths<\/a><\/div>\n<div><a href=\"#option-showWeek\">showWeek<\/a><\/div>\n<div><a href=\"#option-stepMonths\">stepMonths<\/a><\/div>\n<div><a href=\"#option-weekHeader\">weekHeader<\/a><\/div>\n<div><a href=\"#option-yearRange\">yearRange<\/a><\/div>\n<div><a href=\"#option-yearSuffix\">yearSuffix<\/a><\/div>\n<\/div>\n<div class=\"quick-nav-section\">\n<h3>Methods<\/h3>\n<div><a href=\"#method-destroy\">destroy<\/a><\/div>\n<div><a href=\"#method-dialog\">dialog<\/a><\/div>\n<div><a href=\"#method-getDate\">getDate<\/a><\/div>\n<div><a href=\"#method-hide\">hide<\/a><\/div>\n<div><a href=\"#method-isDisabled\">isDisabled<\/a><\/div>\n<div><a href=\"#method-refresh\">refresh<\/a><\/div>\n<div><a href=\"#method-setDate\">setDate<\/a><\/div>\n<div><a href=\"#method-show\">show<\/a><\/div>\n<\/div>\n<div class=\"quick-nav-section\"><h3>Events<\/h3><\/div><\/section><div class=\"longdesc\" id=\"entry-longdesc\">\n\t\t<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>\n\n\t\t<p>By default, the datepicker calendar opens in a small overlay when the associated text field gains focus. For an inline calendar, simply attach the datepicker to a div or span.<\/p>\n\n\t\t<h3>Keyboard interaction<\/h3>\n\t\t<p>While the datepicker is open, the following key commands are available:<\/p>\n\t\t<ul>\n\t\t\t<li>PAGE UP: Move to the previous month.<\/li>\n\t\t\t<li>PAGE DOWN: Move to the next month.<\/li>\n\t\t\t<li>CTRL+PAGE UP: Move to the previous year.<\/li>\n\t\t\t<li>CTRL+PAGE DOWN: Move to the next year.<\/li>\n\t\t\t<li>CTRL+HOME: Move to the current month. Open the datepicker if closed.<\/li>\n\t\t\t<li>CTRL+LEFT: Move to the previous day.<\/li>\n\t\t\t<li>CTRL+RIGHT: Move to the next day.<\/li>\n\t\t\t<li>CTRL+UP: Move to the previous week.<\/li>\n\t\t\t<li>CTRL+DOWN: Move the next week.<\/li>\n\t\t\t<li>ENTER: Select the focused date.<\/li>\n\t\t\t<li>CTRL+END: Close the datepicker and erase the date.<\/li>\n\t\t\t<li>ESCAPE: Close the datepicker without selection.<\/li>\n\t\t<\/ul>\n\n\t\t<h3 id=\"utility-functions\">Utility functions<\/h3>\n\n\t\t<h4>$.datepicker.setDefaults( settings )<\/h4>\n\t\t<p>Change the default settings for all date pickers.<\/p>\n\t\t<p>Use the <a href=\"#method-option\"><code>option()<\/code><\/a> method to change settings for individual instances.<\/p>\n\t\t<div>\n\t\t\t<strong>Code examples:<\/strong>\n\t\t\t<p>Set all date pickers to open on focus or a click on an icon.<\/p>\n\t\t\t<div class=\"syntaxhighlighter javascript\">\n\t<table>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t\n\t\t\t\t<td class=\"gutter\">\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n1\">1<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n2\">2<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n3\">3<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n4\">4<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n5\">5<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n6\">6<\/div>\n\t\t\t\t\t\n\t\t\t\t<\/td>\n\t\t\t\t\n\t\t\t\t<td class=\"code\">\n\t\t\t\t\t<pre><div class=\"container\"><div class=\"line\"><code>$.datepicker.setDefaults({<\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>  <span class=\"hljs-attr\">showOn<\/span>: <span class=\"hljs-string\">&quot;both&quot;<\/span>,<\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>  <span class=\"hljs-attr\">buttonImageOnly<\/span>: <span class=\"hljs-literal\">true<\/span>,<\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>  <span class=\"hljs-attr\">buttonImage<\/span>: <span class=\"hljs-string\">&quot;calendar.gif&quot;<\/span>,<\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>  <span class=\"hljs-attr\">buttonText<\/span>: <span class=\"hljs-string\">&quot;Calendar&quot;<\/span><\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>});<\/code><\/div><\/div><\/pre>\n\t\t\t\t<\/td>\n\t\t\t<\/tr>\n\t\t<\/tbody>\n\t<\/table>\n<\/div>\n\n\t\t\t<p>Set all date pickers to have French text.<\/p>\n\t\t\t<div class=\"syntaxhighlighter javascript\">\n\t<table>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t\n\t\t\t\t<td class=\"gutter\">\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n1\">1<\/div>\n\t\t\t\t\t\n\t\t\t\t<\/td>\n\t\t\t\t\n\t\t\t\t<td class=\"code\">\n\t\t\t\t\t<pre><div class=\"container\"><div class=\"line\"><code>$.datepicker.setDefaults( $.datepicker.regional[ <span class=\"hljs-string\">&quot;fr&quot;<\/span> ] );<\/code><\/div><\/div><\/pre>\n\t\t\t\t<\/td>\n\t\t\t<\/tr>\n\t\t<\/tbody>\n\t<\/table>\n<\/div>\n\n\t\t<\/div>\n\n\t\t<h4>$.datepicker.formatDate( format, date, settings )<\/h4>\n\t\t<p>Format a date into a string value with a specified format.<\/p>\n\t\t<p>The format can be combinations of the following:<\/p>\n\t\t<ul>\n\t\t\t<li>d - day of month (no leading zero)<\/li>\n\t\t\t<li>dd - day of month (two digit)<\/li>\n\t\t\t<li>o - day of the year (no leading zeros)<\/li>\n\t\t\t<li>oo - day of the year (three digit)<\/li>\n\t\t\t<li>D - day name short<\/li>\n\t\t\t<li>DD - day name long<\/li>\n\t\t\t<li>m - month of year (no leading zero)<\/li>\n\t\t\t<li>mm - month of year (two digit)<\/li>\n\t\t\t<li>M - month name short<\/li>\n\t\t\t<li>MM - month name long<\/li>\n\t\t\t<li>y - year (two digit)<\/li>\n\t\t\t<li>yy - year (four digit)<\/li>\n\t\t\t<li>@ - Unix timestamp (ms since 01\/01\/1970)<\/li>\n\t\t\t<li> ! - Windows ticks (100ns since 01\/01\/0001)<\/li>\n\t\t\t<li>&apos;...&apos; - literal text<\/li>\n\t\t\t<li>&apos;&apos; - single quote<\/li>\n\t\t\t<li>anything else - literal text<\/li>\n\t\t<\/ul>\n\t\t<p>There are also a number of predefined standard date formats available from <code>$.datepicker<\/code>:<\/p>\n\t\t<ul>\n\t\t\t<li>ATOM - &apos;yy-mm-dd&apos; (Same as RFC 3339\/ISO 8601)<\/li>\n\t\t\t<li>COOKIE - &apos;D, dd M yy&apos;<\/li>\n\t\t\t<li>ISO_8601 - &apos;yy-mm-dd&apos;<\/li>\n\t\t\t<li>RFC_822 - &apos;D, d M y&apos; (See RFC 822)<\/li>\n\t\t\t<li>RFC_850 - &apos;DD, dd-M-y&apos; (See RFC 850)<\/li>\n\t\t\t<li>RFC_1036 - &apos;D, d M y&apos; (See RFC 1036)<\/li>\n\t\t\t<li>RFC_1123 - &apos;D, d M yy&apos; (See RFC 1123)<\/li>\n\t\t\t<li>RFC_2822 - &apos;D, d M yy&apos; (See RFC 2822)<\/li>\n\t\t\t<li>RSS - &apos;D, d M y&apos; (Same as RFC 822)<\/li>\n\t\t\t<li>TICKS - &apos;!&apos;<\/li>\n\t\t\t<li>TIMESTAMP - &apos;@&apos;<\/li>\n\t\t\t<li>W3C - &apos;yy-mm-dd&apos; (Same as ISO 8601)<\/li>\n\t\t<\/ul>\n\t\t<div>\n\t\t\t<strong>Code examples:<\/strong>\n\t\t\t<p>Display the date in ISO format. Produces &quot;2007-01-26&quot;.<\/p>\n\t\t\t<div class=\"syntaxhighlighter javascript\">\n\t<table>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t\n\t\t\t\t<td class=\"gutter\">\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n1\">1<\/div>\n\t\t\t\t\t\n\t\t\t\t<\/td>\n\t\t\t\t\n\t\t\t\t<td class=\"code\">\n\t\t\t\t\t<pre><div class=\"container\"><div class=\"line\"><code>$.datepicker.formatDate( <span class=\"hljs-string\">&quot;yy-mm-dd&quot;<\/span>, <span class=\"hljs-keyword\">new<\/span> <span class=\"hljs-built_in\">Date<\/span>( <span class=\"hljs-number\">2007<\/span>, <span class=\"hljs-number\">1<\/span> - <span class=\"hljs-number\">1<\/span>, <span class=\"hljs-number\">26<\/span> ) );<\/code><\/div><\/div><\/pre>\n\t\t\t\t<\/td>\n\t\t\t<\/tr>\n\t\t<\/tbody>\n\t<\/table>\n<\/div>\n\n\t\t\t<p>Display the date in expanded French format. Produces &quot;Samedi, Juillet 14, 2007&quot;.<\/p>\n\t\t\t<div class=\"syntaxhighlighter javascript\">\n\t<table>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t\n\t\t\t\t<td class=\"gutter\">\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n1\">1<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n2\">2<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n3\">3<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n4\">4<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n5\">5<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n6\">6<\/div>\n\t\t\t\t\t\n\t\t\t\t<\/td>\n\t\t\t\t\n\t\t\t\t<td class=\"code\">\n\t\t\t\t\t<pre><div class=\"container\"><div class=\"line\"><code>$.datepicker.formatDate( <span class=\"hljs-string\">&quot;DD, MM d, yy&quot;<\/span>, <span class=\"hljs-keyword\">new<\/span> <span class=\"hljs-built_in\">Date<\/span>( <span class=\"hljs-number\">2007<\/span>, <span class=\"hljs-number\">7<\/span> - <span class=\"hljs-number\">1<\/span>, <span class=\"hljs-number\">14<\/span> ), {<\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>  <span class=\"hljs-attr\">dayNamesShort<\/span>: $.datepicker.regional[ <span class=\"hljs-string\">&quot;fr&quot;<\/span> ].dayNamesShort,<\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>  <span class=\"hljs-attr\">dayNames<\/span>: $.datepicker.regional[ <span class=\"hljs-string\">&quot;fr&quot;<\/span> ].dayNames,<\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>  <span class=\"hljs-attr\">monthNamesShort<\/span>: $.datepicker.regional[ <span class=\"hljs-string\">&quot;fr&quot;<\/span> ].monthNamesShort,<\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>  <span class=\"hljs-attr\">monthNames<\/span>: $.datepicker.regional[ <span class=\"hljs-string\">&quot;fr&quot;<\/span> ].monthNames<\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>});<\/code><\/div><\/div><\/pre>\n\t\t\t\t<\/td>\n\t\t\t<\/tr>\n\t\t<\/tbody>\n\t<\/table>\n<\/div>\n\n\t\t<\/div>\n\n\t\t<h4>$.datepicker.parseDate( format, value, settings )<\/h4>\n\t\t<p>Extract a date from a string value with a specified format.<\/p>\n\t\t<p>The format can be combinations of the following:<\/p>\n\t\t<ul>\n\t\t\t<li>d - day of month (no leading zero)<\/li>\n\t\t\t<li>dd - day of month (two digit)<\/li>\n\t\t\t<li>o - day of year (no leading zeros)<\/li>\n\t\t\t<li>oo - day of year (three digit)<\/li>\n\t\t\t<li>D - day name short<\/li>\n\t\t\t<li>DD - day name long<\/li>\n\t\t\t<li>m - month of year (no leading zero)<\/li>\n\t\t\t<li>mm - month of year (two digit)<\/li>\n\t\t\t<li>M - month name short<\/li>\n\t\t\t<li>MM - month name long<\/li>\n\t\t\t<li>y - year (two digit)<\/li>\n\t\t\t<li>yy - year (four digit)<\/li>\n\t\t\t<li>@ - Unix timestamp (ms since 01\/01\/1970)<\/li>\n\t\t\t<li> ! - Windows ticks (100ns since 01\/01\/0001)<\/li>\n\t\t\t<li>&apos;...&apos; - literal text<\/li>\n\t\t\t<li>&apos;&apos; - single quote<\/li>\n\t\t\t<li>anything else - literal text<\/li>\n\t\t<\/ul>\n\t\t<p>A number of exceptions may be thrown:<\/p>\n\t\t<ul>\n\t\t\t<li>&apos;Invalid arguments&apos; if either format or value is null<\/li>\n\t\t\t<li>&apos;Missing number at position nn&apos; if format indicated a numeric value that is not then found<\/li>\n\t\t\t<li>&apos;Unknown name at position nn&apos; if format indicated day or month name that is not then found<\/li>\n\t\t\t<li>&apos;Unexpected literal at position nn&apos; if format indicated a literal value that is not then found<\/li>\n\t\t\t<li>&apos;Invalid date&apos; if the date is invalid, such as &apos;31\/02\/2007&apos;<\/li>\n\t\t<\/ul>\n\t\t<div>\n\t\t\t<strong>Code examples:<\/strong>\n\t\t\t<p>Extract a date in ISO format.<\/p>\n\t\t\t<div class=\"syntaxhighlighter javascript\">\n\t<table>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t\n\t\t\t\t<td class=\"gutter\">\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n1\">1<\/div>\n\t\t\t\t\t\n\t\t\t\t<\/td>\n\t\t\t\t\n\t\t\t\t<td class=\"code\">\n\t\t\t\t\t<pre><div class=\"container\"><div class=\"line\"><code>$.datepicker.parseDate( <span class=\"hljs-string\">&quot;yy-mm-dd&quot;<\/span>, <span class=\"hljs-string\">&quot;2007-01-26&quot;<\/span> );<\/code><\/div><\/div><\/pre>\n\t\t\t\t<\/td>\n\t\t\t<\/tr>\n\t\t<\/tbody>\n\t<\/table>\n<\/div>\n\n\t\t\t<p>Extract a date in expanded French format.<\/p>\n\t\t\t<div class=\"syntaxhighlighter javascript\">\n\t<table>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t\n\t\t\t\t<td class=\"gutter\">\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n1\">1<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n2\">2<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n3\">3<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n4\">4<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n5\">5<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n6\">6<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n7\">7<\/div>\n\t\t\t\t\t\n\t\t\t\t<\/td>\n\t\t\t\t\n\t\t\t\t<td class=\"code\">\n\t\t\t\t\t<pre><div class=\"container\"><div class=\"line\"><code>$.datepicker.parseDate( <span class=\"hljs-string\">&quot;DD, MM d, yy&quot;<\/span>, <span class=\"hljs-string\">&quot;Samedi, Juillet 14, 2007&quot;<\/span>, {<\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>  <span class=\"hljs-attr\">shortYearCuroff<\/span>: <span class=\"hljs-number\">20<\/span>,<\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>  <span class=\"hljs-attr\">dayNamesShort<\/span>: $.datepicker.regional[ <span class=\"hljs-string\">&quot;fr&quot;<\/span> ].dayNamesShort,<\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>  <span class=\"hljs-attr\">dayNames<\/span>: $.datepicker.regional[ <span class=\"hljs-string\">&quot;fr&quot;<\/span> ].dayNames,<\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>  <span class=\"hljs-attr\">monthNamesShort<\/span>: $.datepicker.regional[ <span class=\"hljs-string\">&quot;fr&quot;<\/span> ].monthNamesShort,<\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>  <span class=\"hljs-attr\">monthNames<\/span>: $.datepicker.regional[ <span class=\"hljs-string\">&quot;fr&quot;<\/span> ].monthNames<\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>});<\/code><\/div><\/div><\/pre>\n\t\t\t\t<\/td>\n\t\t\t<\/tr>\n\t\t<\/tbody>\n\t<\/table>\n<\/div>\n\n\t\t<\/div>\n\n\t\t<h4>$.datepicker.iso8601Week( date )<\/h4>\n\t\t<p>Determine the week of the year for a given date: 1 to 53.<\/p>\n\t\t<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>\n\t\t<p>This function is the default implementation for the <a href=\"#option-calculateWeek\"><code>calculateWeek<\/code><\/a> option.<\/p>\n\t\t<div>\n\t\t\t<strong>Code examples:<\/strong>\n\t\t\t<p>Find the week of the year for a date.<\/p>\n\t\t\t<div class=\"syntaxhighlighter javascript\">\n\t<table>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t\n\t\t\t\t<td class=\"gutter\">\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n1\">1<\/div>\n\t\t\t\t\t\n\t\t\t\t<\/td>\n\t\t\t\t\n\t\t\t\t<td class=\"code\">\n\t\t\t\t\t<pre><div class=\"container\"><div class=\"line\"><code>$.datepicker.iso8601Week( <span class=\"hljs-keyword\">new<\/span> <span class=\"hljs-built_in\">Date<\/span>( <span class=\"hljs-number\">2007<\/span>, <span class=\"hljs-number\">1<\/span> - <span class=\"hljs-number\">1<\/span>, <span class=\"hljs-number\">26<\/span> ) );<\/code><\/div><\/div><\/pre>\n\t\t\t\t<\/td>\n\t\t\t<\/tr>\n\t\t<\/tbody>\n\t<\/table>\n<\/div>\n\n\t\t<\/div>\n\n\t\t<h4>$.datepicker.noWeekends<\/h4>\n\t\t<p>Set as beforeShowDay function to prevent selection of weekends.<\/p>\n\t\t<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>\n\t\t<div>\n\t\t\t<strong>Code examples:<\/strong>\n\t\t\t<p>Set the DatePicker so no weekend is selectable<\/p>\n\t\t\t<div class=\"syntaxhighlighter javascript\">\n\t<table>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t\n\t\t\t\t<td class=\"gutter\">\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n1\">1<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n2\">2<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n3\">3<\/div>\n\t\t\t\t\t\n\t\t\t\t<\/td>\n\t\t\t\t\n\t\t\t\t<td class=\"code\">\n\t\t\t\t\t<pre><div class=\"container\"><div class=\"line\"><code>$( <span class=\"hljs-string\">&quot;#datepicker&quot;<\/span> ).datepicker({<\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>  <span class=\"hljs-attr\">beforeShowDay<\/span>: $.datepicker.noWeekends<\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>});<\/code><\/div><\/div><\/pre>\n\t\t\t\t<\/td>\n\t\t\t<\/tr>\n\t\t<\/tbody>\n\t<\/table>\n<\/div>\n\n\t\t<\/div>\n\n\t\t<h3>Localization<\/h3>\n\t\t<p>Datepicker provides support for localizing its content to cater for different languages and date formats. Each localization is contained within its own file with the language code appended to the name, e.g., <code>jquery.ui.datepicker-fr.js<\/code> for French. The desired localization file should be included after the main datepicker code. Each localization file adds its settings to the set of available localizations and automatically applies them as defaults for all instances.<\/p>\n\t\t<p>The <code>$.datepicker.regional<\/code> attribute holds an array of localizations, indexed by language code, with <code>&quot;&quot;<\/code> referring to the default (English). Each entry is an object with the following attributes: <code>closeText<\/code>, <code>prevText<\/code>, <code>nextText<\/code>, <code>currentText<\/code>, <code>monthNames<\/code>, <code>monthNamesShort<\/code>, <code>dayNames<\/code>, <code>dayNamesShort<\/code>, <code>dayNamesMin<\/code>, <code>weekHeader<\/code>, <code>dateFormat<\/code>, <code>firstDay<\/code>, <code>isRTL<\/code>, <code>showMonthAfterYear<\/code>, and <code>yearSuffix<\/code>.<\/p>\n\t\t<p>You can restore the default localizations with:<\/p>\n\t\t<code>$.datepicker.setDefaults( $.datepicker.regional[ &quot;&quot; ] );<\/code>\n\t\t<p>And can then override an individual datepicker for a specific locale:<\/p>\n\t\t<code>$( selector ).datepicker( $.datepicker.regional[ &quot;fr&quot; ] );<\/code>\n\t<\/div>\n<h3>Additional Notes:<\/h3>\n<div class=\"longdesc\"><ul><li>\n\t\t\tThis widget requires some functional CSS, otherwise it won&apos;t work. If you build a custom theme, use the widget&apos;s specific CSS file as a starting point.\n\t\t<\/li><\/ul><\/div>\n<section id=\"options\"><header><h2>Options<\/h2><\/header><div id=\"option-altField\" class=\"api-item first-item\">\n<h3>altField&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Selector\">Selector<\/a> or <a href=\"http:\/\/api.jquery.com\/Types\/#jQuery\">jQuery<\/a> or <a href=\"http:\/\/api.jquery.com\/Types\/#Element\">Element<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>&quot;&quot;<\/code>\n<\/div>\n<div>An input element that is to be updated with the selected date from the datepicker. Use the <a href=\"#option-altFormat\"><code>altFormat<\/code><\/a> option to change the format of the date within this field. Leave as blank for no alternate field.<\/div>\n<\/div>\n<div id=\"option-altFormat\" class=\"api-item\">\n<h3>altFormat&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#String\">String<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>&quot;&quot;<\/code>\n<\/div>\n<div>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<\/div>\n<\/div>\n<div id=\"option-appendText\" class=\"api-item\">\n<h3>appendText&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#String\">String<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>&quot;&quot;<\/code>\n<\/div>\n<div>The text to display after each date field, e.g., to show the required format.<\/div>\n<\/div>\n<div id=\"option-autoSize\" class=\"api-item\">\n<h3>autoSize&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Boolean\">Boolean<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>false<\/code>\n<\/div>\n<div>Set to <code>true<\/code> to automatically resize the input field to accommodate dates in the current <a href=\"#option-dateFormat\"><code>dateFormat<\/code><\/a>.<\/div>\n<\/div>\n<div id=\"option-beforeShow\" class=\"api-item\">\n<h3>beforeShow&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Function\">Function<\/a>( <a href=\"http:\/\/api.jquery.com\/Types\/#Element\">Element<\/a> input, <a href=\"http:\/\/api.jquery.com\/Types\/#Object\">Object<\/a> inst )<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>null<\/code>\n<\/div>\n<div>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.<\/div>\n<\/div>\n<div id=\"option-beforeShowDay\" class=\"api-item\">\n<h3>beforeShowDay&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Function\">Function<\/a>( <a href=\"http:\/\/api.jquery.com\/Types\/#Date\">Date<\/a> date )<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>null<\/code>\n<\/div>\n<div>A function takes a date as a parameter and must return an array with <code>[0]<\/code> equal to <code>true<\/code>\/<code>false<\/code> indicating whether or not this date is selectable, <code>[1]<\/code> equal to a CSS class name or <code>&quot;&quot;<\/code> for the default presentation, and <code>[2]<\/code> an optional popup tooltip for this date. It is called for each day in the datepicker before it is displayed.<\/div>\n<\/div>\n<div id=\"option-buttonImage\" class=\"api-item\">\n<h3>buttonImage&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#String\">String<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>&quot;&quot;<\/code>\n<\/div>\n<div>The URL for the popup button image. If set, the <a href=\"#option-buttonText\"><code>buttonText<\/code><\/a> option becomes the <code>alt<\/code> value and is not directly displayed.<\/div>\n<\/div>\n<div id=\"option-buttonImageOnly\" class=\"api-item\">\n<h3>buttonImageOnly&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Boolean\">Boolean<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>false<\/code>\n<\/div>\n<div>Whether the button image should be rendered by itself instead of inside a button element.<\/div>\n<\/div>\n<div id=\"option-buttonText\" class=\"api-item\">\n<h3>buttonText&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#String\">String<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>&quot;...&quot;<\/code>\n<\/div>\n<div>The text to display on the trigger button. Use in conjunction with the <a href=\"#option-showOn\"><code>showOn<\/code><\/a> option set to <code>&quot;button&quot;<\/code> or <code>&quot;both&quot;<\/code>.<\/div>\n<\/div>\n<div id=\"option-calculateWeek\" class=\"api-item\">\n<h3>calculateWeek&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Function\">Function<\/a>()<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>jQuery.datepicker.iso8601Week<\/code>\n<\/div>\n<div>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.<\/div>\n<\/div>\n<div id=\"option-changeMonth\" class=\"api-item\">\n<h3>changeMonth&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Boolean\">Boolean<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>false<\/code>\n<\/div>\n<div>Whether the month should be rendered as a dropdown instead of text.<\/div>\n<\/div>\n<div id=\"option-changeYear\" class=\"api-item\">\n<h3>changeYear&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Boolean\">Boolean<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>false<\/code>\n<\/div>\n<div>Whether the year should be rendered as a dropdown instead of text. Use the <a href=\"#option-yearRange\"><code>yearRange<\/code><\/a> option to control which years are made available for selection.<\/div>\n<\/div>\n<div id=\"option-closeText\" class=\"api-item\">\n<h3>closeText&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#String\">String<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>&quot;Done&quot;<\/code>\n<\/div>\n<div>The text to display for the close link. Use the <a href=\"#option-showButtonPanel\"><code>showButtonPanel<\/code><\/a> option to display this button.<\/div>\n<\/div>\n<div id=\"option-constrainInput\" class=\"api-item\">\n<h3>constrainInput&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Boolean\">Boolean<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>true<\/code>\n<\/div>\n<div>When <code>true<\/code>, entry in the input field is constrained to those characters allowed by the current <a href=\"#option-dateFormat\"><code>dateFormat<\/code><\/a> option.<\/div>\n<\/div>\n<div id=\"option-currentText\" class=\"api-item\">\n<h3>currentText&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#String\">String<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>&quot;Today&quot;<\/code>\n<\/div>\n<div>The text to display for the current day link. Use the <a href=\"#option-showButtonPanel\"><code>showButtonPanel<\/code><\/a> option to display this button.<\/div>\n<\/div>\n<div id=\"option-dateFormat\" class=\"api-item\">\n<h3>dateFormat&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#String\">String<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>&quot;mm\/dd\/yy&quot;<\/code>\n<\/div>\n<div>The format for parsed and displayed dates. For a full list of the possible formats see the <code>[[UI\/Datepicker\/formatDate|formatDate]]<\/code> function.<\/div>\n<\/div>\n<div id=\"option-dayNames\" class=\"api-item\">\n<h3>dayNames&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Array\">Array<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>[ &quot;Sunday&quot;, &quot;Monday&quot;, &quot;Tuesday&quot;, &quot;Wednesday&quot;, &quot;Thursday&quot;, &quot;Friday&quot;, &quot;Saturday&quot; ]<\/code>\n<\/div>\n<div>The list of long day names, starting from Sunday, for use as requested via the <a href=\"#option-dateFormat\"><code>dateFormat<\/code><\/a> option.<\/div>\n<\/div>\n<div id=\"option-dayNamesMin\" class=\"api-item\">\n<h3>dayNamesMin&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Array\">Array<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>[ &quot;Su&quot;, &quot;Mo&quot;, &quot;Tu&quot;, &quot;We&quot;, &quot;Th&quot;, &quot;Fr&quot;, &quot;Sa&quot; ]<\/code>\n<\/div>\n<div>The list of minimised day names, starting from Sunday, for use as column headers within the datepicker.<\/div>\n<\/div>\n<div id=\"option-dayNamesShort\" class=\"api-item\">\n<h3>dayNamesShort&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Array\">Array<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>[ &quot;Sun&quot;, &quot;Mon&quot;, &quot;Tue&quot;, &quot;Wed&quot;, &quot;Thu&quot;, &quot;Fri&quot;, &quot;Sat&quot; ]<\/code>\n<\/div>\n<div>The list of abbreviated day names, starting from Sunday, for use as requested via the <a href=\"#option-dateFormat\"><code>dateFormat<\/code><\/a> option.<\/div>\n<\/div>\n<div id=\"option-defaultDate\" class=\"api-item\">\n<h3>defaultDate&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Date\">Date<\/a> or <a href=\"http:\/\/api.jquery.com\/Types\/#Number\">Number<\/a> or <a href=\"http:\/\/api.jquery.com\/Types\/#String\">String<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>null<\/code>\n<\/div>\n<div>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 (&apos;y&apos; for years, &apos;m&apos; for months, &apos;w&apos; for weeks, &apos;d&apos; for days, e.g. &apos;+1m +7d&apos;), or null for today.<\/div>\n<strong>Multiple types supported:<\/strong><ul>\n<li>\n<strong>Date<\/strong>: A date object containing the default date.<\/li>\n<li>\n<strong>Number<\/strong>: A number of days from today. For example <code>2<\/code> represents two days from today and <code>-1<\/code> represents yesterday.<\/li>\n<li>\n<strong>String<\/strong>: A string in the format defined by the <a href=\"#option-dateFormat\"><code>dateFormat<\/code><\/a> option, or a relative date. Relative dates must contain value and period pairs; valid periods are <code>&quot;y&quot;<\/code> for years, <code>&quot;m&quot;<\/code> for months, <code>&quot;w&quot;<\/code> for weeks, and <code>&quot;d&quot;<\/code> for days. For example, <code>&quot;+1m +7d&quot;<\/code> represents one month and seven days from today.<\/li>\n<\/ul>\n<\/div>\n<div id=\"option-duration\" class=\"api-item\">\n<h3>duration&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#\"><\/a> or <a href=\"http:\/\/api.jquery.com\/Types\/#String\">String<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>&quot;normal&quot;<\/code>\n<\/div>\n<div>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 (&quot;slow&quot;, &quot;normal&quot;, &quot;fast&quot;).<\/div>\n<\/div>\n<div id=\"option-firstDay\" class=\"api-item\">\n<h3>firstDay&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Integer\">Integer<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>0<\/code>\n<\/div>\n<div>Set the first day of the week: Sunday is <code>0<\/code>, Monday is <code>1<\/code>, etc.<\/div>\n<\/div>\n<div id=\"option-gotoCurrent\" class=\"api-item\">\n<h3>gotoCurrent&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Boolean\">Boolean<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>false<\/code>\n<\/div>\n<div>When <code>true<\/code>, the current day link moves to the currently selected date instead of today.<\/div>\n<\/div>\n<div id=\"option-hideIfNoPrevNext\" class=\"api-item\">\n<h3>hideIfNoPrevNext&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Boolean\">Boolean<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>false<\/code>\n<\/div>\n<div>Normally the previous and next links are disabled when not applicable (see the <a href=\"#option-minDate\"><code>minDate<\/code><\/a> and <a href=\"#option-maxDate\"><code>maxDate<\/code><\/a> options). You can hide them altogether by setting this attribute to <code>true<\/code>.<\/div>\n<\/div>\n<div id=\"option-isRTL\" class=\"api-item\">\n<h3>isRTL&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Boolean\">Boolean<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>false<\/code>\n<\/div>\n<div>Whether the current language is drawn from right to left.<\/div>\n<\/div>\n<div id=\"option-maxDate\" class=\"api-item\">\n<h3>maxDate&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Date\">Date<\/a> or <a href=\"http:\/\/api.jquery.com\/Types\/#Number\">Number<\/a> or <a href=\"http:\/\/api.jquery.com\/Types\/#String\">String<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>null<\/code>\n<\/div>\n<div>The maximum selectable date. When set to <code>null<\/code>, there is no maximum.<\/div>\n<strong>Multiple types supported:<\/strong><ul>\n<li>\n<strong>Date<\/strong>: A date object containing the maximum date.<\/li>\n<li>\n<strong>Number<\/strong>: A number of days from today. For example <code>2<\/code> represents two days from today and <code>-1<\/code> represents yesterday.<\/li>\n<li>\n<strong>String<\/strong>: A string in the format defined by the <a href=\"#option-dateFormat\"><code>dateFormat<\/code><\/a> option, or a relative date. Relative dates must contain value and period pairs; valid periods are <code>&quot;y&quot;<\/code> for years, <code>&quot;m&quot;<\/code> for months, <code>&quot;w&quot;<\/code> for weeks, and <code>&quot;d&quot;<\/code> for days. For example, <code>&quot;+1m +7d&quot;<\/code> represents one month and seven days from today.<\/li>\n<\/ul>\n<\/div>\n<div id=\"option-minDate\" class=\"api-item\">\n<h3>minDate&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Date\">Date<\/a> or <a href=\"http:\/\/api.jquery.com\/Types\/#Number\">Number<\/a> or <a href=\"http:\/\/api.jquery.com\/Types\/#String\">String<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>null<\/code>\n<\/div>\n<div>The minimum selectable date. When set to <code>null<\/code>, there is no minimum.<\/div>\n<strong>Multiple types supported:<\/strong><ul>\n<li>\n<strong>Date<\/strong>: A date object containing the minimum date.<\/li>\n<li>\n<strong>Number<\/strong>: A number of days from today. For example <code>2<\/code> represents two days from today and <code>-1<\/code> represents yesterday.<\/li>\n<li>\n<strong>String<\/strong>: A string in the format defined by the <a href=\"#option-dateFormat\"><code>dateFormat<\/code><\/a> option, or a relative date. Relative dates must contain value and period pairs; valid periods are <code>&quot;y&quot;<\/code> for years, <code>&quot;m&quot;<\/code> for months, <code>&quot;w&quot;<\/code> for weeks, and <code>&quot;d&quot;<\/code> for days. For example, <code>&quot;+1m +7d&quot;<\/code> represents one month and seven days from today.<\/li>\n<\/ul>\n<\/div>\n<div id=\"option-monthNames\" class=\"api-item\">\n<h3>monthNames&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Array\">Array<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>[ &quot;January&quot;, &quot;February&quot;, &quot;March&quot;, &quot;April&quot;, &quot;May&quot;, &quot;June&quot;, &quot;July&quot;, &quot;August&quot;, &quot;September&quot;, &quot;October&quot;, &quot;November&quot;, &quot;December&quot; ]<\/code>\n<\/div>\n<div>The list of full month names, for use as requested via the <a href=\"#option-dateFormat\"><code>dateFormat<\/code><\/a> option.<\/div>\n<\/div>\n<div id=\"option-monthNamesShort\" class=\"api-item\">\n<h3>monthNamesShort&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Array\">Array<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>[ &quot;Jan&quot;, &quot;Feb&quot;, &quot;Mar&quot;, &quot;Apr&quot;, &quot;May&quot;, &quot;Jun&quot;, &quot;Jul&quot;, &quot;Aug&quot;, &quot;Sep&quot;, &quot;Oct&quot;, &quot;Nov&quot;, &quot;Dec&quot; ]<\/code>\n<\/div>\n<div>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.<\/div>\n<\/div>\n<div id=\"option-navigationAsDateFormat\" class=\"api-item\">\n<h3>navigationAsDateFormat&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Boolean\">Boolean<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>false<\/code>\n<\/div>\n<div>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.<\/div>\n<\/div>\n<div id=\"option-nextText\" class=\"api-item\">\n<h3>nextText&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#String\">String<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>&quot;Next&quot;<\/code>\n<\/div>\n<div>The text to display for the next month link. With the standard ThemeRoller styling, this value is replaced by an icon.<\/div>\n<\/div>\n<div id=\"option-numberOfMonths\" class=\"api-item\">\n<h3>numberOfMonths&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Number\">Number<\/a> or <a href=\"http:\/\/api.jquery.com\/Types\/#Array\">Array<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>1<\/code>\n<\/div>\n<div>The number of months to show at once.<\/div>\n<strong>Multiple types supported:<\/strong><ul>\n<li>\n<strong>Number<\/strong>: The number of months to display in a single row.<\/li>\n<li>\n<strong>Array<\/strong>: An array defining the number of rows and columns to display.<\/li>\n<\/ul>\n<\/div>\n<div id=\"option-onChangeMonthYear\" class=\"api-item\">\n<h3>onChangeMonthYear&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Function\">Function<\/a>( <a href=\"http:\/\/api.jquery.com\/Types\/#Integer\">Integer<\/a> year, <a href=\"http:\/\/api.jquery.com\/Types\/#Integer\">Integer<\/a> month, <a href=\"http:\/\/api.jquery.com\/Types\/#Object\">Object<\/a> inst )<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>null<\/code>\n<\/div>\n<div>Called 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.<\/div>\n<\/div>\n<div id=\"option-onClose\" class=\"api-item\">\n<h3>onClose&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Function\">Function<\/a>( <a href=\"http:\/\/api.jquery.com\/Types\/#String\">String<\/a> dateText, <a href=\"http:\/\/api.jquery.com\/Types\/#Object\">Object<\/a> inst )<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>null<\/code>\n<\/div>\n<div>Called when the datepicker is closed, whether or not a date is selected. The function receives the selected date as text (<code>&quot;&quot;<\/code> if none) and the datepicker instance as parameters. <code>this<\/code> refers to the associated input field.<\/div>\n<\/div>\n<div id=\"option-onSelect\" class=\"api-item\">\n<h3>onSelect&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Function\">Function<\/a>( <a href=\"http:\/\/api.jquery.com\/Types\/#String\">String<\/a> dateText, <a href=\"http:\/\/api.jquery.com\/Types\/#Object\">Object<\/a> inst )<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>null<\/code>\n<\/div>\n<div>Called 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.<\/div>\n<\/div>\n<div id=\"option-prevText\" class=\"api-item\">\n<h3>prevText&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#String\">String<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>&quot;Prev&quot;<\/code>\n<\/div>\n<div>The text to display for the previous month link. With the standard ThemeRoller styling, this value is replaced by an icon.<\/div>\n<\/div>\n<div id=\"option-selectOtherMonths\" class=\"api-item\">\n<h3>selectOtherMonths&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Boolean\">Boolean<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>false<\/code>\n<\/div>\n<div>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>.<\/div>\n<\/div>\n<div id=\"option-shortYearCutoff\" class=\"api-item\">\n<h3>shortYearCutoff&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Number\">Number<\/a> or <a href=\"http:\/\/api.jquery.com\/Types\/#String\">String<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>&quot;+10&quot;<\/code>\n<\/div>\n<div>The cutoff year for determining the century for a date (used in conjunction with <code>[[UI\/Datepicker#option-dateFormat|dateFormat]]<\/code> &apos;y&apos;). 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.<\/div>\n<strong>Multiple types supported:<\/strong><ul>\n<li>\n<strong>Number<\/strong>: A value between <code>0<\/code> and <code>99<\/code> indicating the cutoff year.<\/li>\n<li>\n<strong>String<\/strong>: A relative number of years from the current year, e.g., <code>&quot;+3&quot;<\/code> or <code>&quot;-5&quot;<\/code>.<\/li>\n<\/ul>\n<\/div>\n<div id=\"option-showAnim\" class=\"api-item\">\n<h3>showAnim&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#String\">String<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>&quot;show&quot;<\/code>\n<\/div>\n<div>The name of the animation used to show and hide the datepicker. Use <code>&quot;show&quot;<\/code> (the default), <code>&quot;slideDown&quot;<\/code>, <code>&quot;fadeIn&quot;<\/code>, any of the <a href=\"\/1.8\/category\/effects\/\">jQuery UI effects<\/a>. Set to an empty string to disable animation.<\/div>\n<\/div>\n<div id=\"option-showButtonPanel\" class=\"api-item\">\n<h3>showButtonPanel&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Boolean\">Boolean<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>false<\/code>\n<\/div>\n<div>Whether to show the button panel.<\/div>\n<\/div>\n<div id=\"option-showCurrentAtPos\" class=\"api-item\">\n<h3>showCurrentAtPos&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Number\">Number<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>0<\/code>\n<\/div>\n<div>When displaying multiple months via the <a href=\"#option-numberOfMonths\"><code>numberOfMonths<\/code><\/a> option, the <code>showCurrentAtPos<\/code> option defines which position to display the current month in.<\/div>\n<\/div>\n<div id=\"option-showMonthAfterYear\" class=\"api-item\">\n<h3>showMonthAfterYear&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Boolean\">Boolean<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>false<\/code>\n<\/div>\n<div>Whether to show the month after the year in the header.<\/div>\n<\/div>\n<div id=\"option-showOn\" class=\"api-item\">\n<h3>showOn&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#String\">String<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>&quot;focus&quot;<\/code>\n<\/div>\n<div>When the datepicker should appear. The datepicker can appear when the field receives focus (<code>&quot;focus&quot;<\/code>), when a button is clicked (<code>&quot;button&quot;<\/code>), or when either event occurs (<code>&quot;both&quot;<\/code>).<\/div>\n<\/div>\n<div id=\"option-showOptions\" class=\"api-item\">\n<h3>showOptions&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Object\">Object<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>{}<\/code>\n<\/div>\n<div>If using one of the jQuery UI effects for the <a href=\"#option-showAnim\"><code>showAnim<\/code><\/a> option, you can provide additional settings for that animation via this option.<\/div>\n<\/div>\n<div id=\"option-showOtherMonths\" class=\"api-item\">\n<h3>showOtherMonths&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Boolean\">Boolean<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>false<\/code>\n<\/div>\n<div>Whether to display dates in other months (non-selectable) at the start or end of the current month. To make these days selectable use the <a href=\"#option-selectOtherMonths\"><code>selectOtherMonths<\/code><\/a> option.<\/div>\n<\/div>\n<div id=\"option-showWeek\" class=\"api-item\">\n<h3>showWeek&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Boolean\">Boolean<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>false<\/code>\n<\/div>\n<div>When <code>true<\/code>, a column is added to show the week of the year. The <a href=\"#option-calculateWeek\"><code>calculateWeek<\/code><\/a> option determines how the week of the year is calculated. You may also want to change the <a href=\"#option-firstDay\"><code>firstDay<\/code><\/a> option.<\/div>\n<\/div>\n<div id=\"option-stepMonths\" class=\"api-item\">\n<h3>stepMonths&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#Number\">Number<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>1<\/code>\n<\/div>\n<div>Set how many months to move when clicking the previous\/next links.<\/div>\n<\/div>\n<div id=\"option-weekHeader\" class=\"api-item\">\n<h3>weekHeader&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#String\">String<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>&quot;Wk&quot;<\/code>\n<\/div>\n<div>The text to display for the week of the year column heading. Use the <a href=\"#option-showWeek\"><code>showWeek<\/code><\/a> option to display this column.<\/div>\n<\/div>\n<div id=\"option-yearRange\" class=\"api-item\">\n<h3>yearRange&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#String\">String<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>&quot;c-10:c+10&quot;<\/code>\n<\/div>\n<div>The range of years displayed in the year drop-down: either relative to today&apos;s year (<code>&quot;-nn:+nn&quot;<\/code>), relative to the currently selected year (<code>&quot;c-nn:c+nn&quot;<\/code>), absolute (<code>&quot;nnnn:nnnn&quot;<\/code>), or combinations of these formats (<code>&quot;nnnn:-nn&quot;<\/code>). Note that this option only affects what appears in the drop-down, to restrict which dates may be selected use the <a href=\"#option-minDate\"><code>minDate<\/code><\/a> and\/or <a href=\"#option-maxDate\"><code>maxDate<\/code><\/a> options.<\/div>\n<\/div>\n<div id=\"option-yearSuffix\" class=\"api-item\">\n<h3>yearSuffix&#xA0;\n\t\t\t\t\t<\/h3>\n<div class=\"option-type\">\n<strong>Type: <\/strong><a href=\"http:\/\/api.jquery.com\/Types\/#String\">String<\/a>\n<\/div>\n<div class=\"default\">\n<strong>Default: <\/strong><code>&quot;&quot;<\/code>\n<\/div>\n<div>Additional text to display after the year in the month headers.<\/div>\n<\/div><\/section><section id=\"methods\"><header><h2>Methods<\/h2><\/header><div id=\"method-destroy\"><div class=\"api-item first-item\">\n<h3>destroy()<span class=\"returns\">Returns: <a href=\"http:\/\/api.jquery.com\/Types\/#jQuery\">jQuery<\/a> (<a href=\"http:\/\/learn.jquery.com\/jquery-ui\/widget-factory\/widget-method-invocation\/\">plugin only<\/a>)<\/span>\n<\/h3>\n<div>\n\t\tRemoves the datepicker functionality completely. This will return the element back to its pre-init state.\n\t<\/div>\n<ul><li><div class=\"null-signature\">This method does not accept any arguments.<\/div><\/li><\/ul>\n<div>\n<strong>Code examples:<\/strong><p>Invoke the destroy method:<\/p>\n<div class=\"syntaxhighlighter javascript\">\n\t<table>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t\n\t\t\t\t<td class=\"gutter\">\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n1\">1<\/div>\n\t\t\t\t\t\n\t\t\t\t<\/td>\n\t\t\t\t\n\t\t\t\t<td class=\"code\">\n\t\t\t\t\t<pre><div class=\"container\"><div class=\"line\"><code>$( <span class=\"hljs-string\">&quot;.selector&quot;<\/span> ).datepicker( <span class=\"hljs-string\">&quot;destroy&quot;<\/span> );<\/code><\/div><\/div><\/pre>\n\t\t\t\t<\/td>\n\t\t\t<\/tr>\n\t\t<\/tbody>\n\t<\/table>\n<\/div>\n\n<\/div>\n<\/div><\/div>\n<div id=\"method-dialog\"><div class=\"api-item\">\n<h3>dialog( date [, onSelect ] [, settings ] [, pos ] )<span class=\"returns\">Returns: <a href=\"http:\/\/api.jquery.com\/Types\/#jQuery\">jQuery<\/a> (<a href=\"http:\/\/learn.jquery.com\/jquery-ui\/widget-factory\/widget-method-invocation\/\">plugin only<\/a>)<\/span>\n<\/h3>\n<div>Opens the datepicker in a dialog box.<\/div>\n<ul>\n<li>\n<div><strong>date<\/strong><\/div>\n<div>Type: <a href=\"http:\/\/api.jquery.com\/Types\/#String\">String<\/a> or <a href=\"http:\/\/api.jquery.com\/Types\/#Date\">Date<\/a>\n<\/div>\n<div>The initial date.<\/div>\n<\/li>\n<li>\n<div><strong>onSelect<\/strong><\/div>\n<div>Type: <a href=\"http:\/\/api.jquery.com\/Types\/#Function\">Function<\/a>()<\/div>\n<div>A callback function when a date is selected. The function receives the date text and date picker instance as parameters.<\/div>\n<\/li>\n<li>\n<div><strong>settings<\/strong><\/div>\n<div>Type: <a href=\"http:\/\/api.jquery.com\/Types\/#Options\">Options<\/a>\n<\/div>\n<div>The new settings for the date picker.<\/div>\n<\/li>\n<li>\n<div><strong>pos<\/strong><\/div>\n<div>Type: <a href=\"http:\/\/api.jquery.com\/Types\/#Number%5B2%5D%20or%20MouseEvent\">Number[2] or MouseEvent<\/a>\n<\/div>\n<div>The position of the top\/left of the dialog as <code>[x, y]<\/code> or a <code>MouseEvent<\/code> that contains the coordinates. If not specified the dialog is centered on the screen.<\/div>\n<\/li>\n<\/ul>\n<div>\n<strong>Code examples:<\/strong><p>Invoke the dialog method:<\/p>\n<div class=\"syntaxhighlighter javascript\">\n\t<table>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t\n\t\t\t\t<td class=\"gutter\">\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n1\">1<\/div>\n\t\t\t\t\t\n\t\t\t\t<\/td>\n\t\t\t\t\n\t\t\t\t<td class=\"code\">\n\t\t\t\t\t<pre><div class=\"container\"><div class=\"line\"><code>$( <span class=\"hljs-string\">&quot;.selector&quot;<\/span> ).datepicker( <span class=\"hljs-string\">&quot;dialog&quot;<\/span> );<\/code><\/div><\/div><\/pre>\n\t\t\t\t<\/td>\n\t\t\t<\/tr>\n\t\t<\/tbody>\n\t<\/table>\n<\/div>\n\n<\/div>\n<\/div><\/div>\n<div id=\"method-getDate\"><div class=\"api-item\">\n<h3>getDate()<span class=\"returns\">Returns: <a href=\"http:\/\/api.jquery.com\/Types\/#Date\">Date<\/a><\/span>\n<\/h3>\n<div>Returns the current date for the datepicker or <code>null<\/code> if no date has been selected.<\/div>\n<ul><li><div class=\"null-signature\">This method does not accept any arguments.<\/div><\/li><\/ul>\n<div>\n<strong>Code examples:<\/strong><p>Invoke the getDate method:<\/p>\n<div class=\"syntaxhighlighter javascript\">\n\t<table>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t\n\t\t\t\t<td class=\"gutter\">\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n1\">1<\/div>\n\t\t\t\t\t\n\t\t\t\t<\/td>\n\t\t\t\t\n\t\t\t\t<td class=\"code\">\n\t\t\t\t\t<pre><div class=\"container\"><div class=\"line\"><code>$( <span class=\"hljs-string\">&quot;.selector&quot;<\/span> ).datepicker( <span class=\"hljs-string\">&quot;getDate&quot;<\/span> );<\/code><\/div><\/div><\/pre>\n\t\t\t\t<\/td>\n\t\t\t<\/tr>\n\t\t<\/tbody>\n\t<\/table>\n<\/div>\n\n<\/div>\n<\/div><\/div>\n<div id=\"method-hide\"><div class=\"api-item\">\n<h3>hide()<span class=\"returns\">Returns: <a href=\"http:\/\/api.jquery.com\/Types\/#jQuery\">jQuery<\/a> (<a href=\"http:\/\/learn.jquery.com\/jquery-ui\/widget-factory\/widget-method-invocation\/\">plugin only<\/a>)<\/span>\n<\/h3>\n<div>Close a previously opened date picker.<\/div>\n<ul><li><div class=\"null-signature\">This method does not accept any arguments.<\/div><\/li><\/ul>\n<div>\n<strong>Code examples:<\/strong><p>Invoke the hide method:<\/p>\n<div class=\"syntaxhighlighter javascript\">\n\t<table>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t\n\t\t\t\t<td class=\"gutter\">\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n1\">1<\/div>\n\t\t\t\t\t\n\t\t\t\t<\/td>\n\t\t\t\t\n\t\t\t\t<td class=\"code\">\n\t\t\t\t\t<pre><div class=\"container\"><div class=\"line\"><code>$( <span class=\"hljs-string\">&quot;.selector&quot;<\/span> ).datepicker( <span class=\"hljs-string\">&quot;hide&quot;<\/span> );<\/code><\/div><\/div><\/pre>\n\t\t\t\t<\/td>\n\t\t\t<\/tr>\n\t\t<\/tbody>\n\t<\/table>\n<\/div>\n\n<\/div>\n<\/div><\/div>\n<div id=\"method-isDisabled\"><div class=\"api-item\">\n<h3>isDisabled()<span class=\"returns\">Returns: <a href=\"http:\/\/api.jquery.com\/Types\/#Boolean\">Boolean<\/a><\/span>\n<\/h3>\n<div>Determine whether a date picker has been disabled.<\/div>\n<ul><li><div class=\"null-signature\">This method does not accept any arguments.<\/div><\/li><\/ul>\n<div>\n<strong>Code examples:<\/strong><p>Invoke the isDisabled method:<\/p>\n<div class=\"syntaxhighlighter javascript\">\n\t<table>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t\n\t\t\t\t<td class=\"gutter\">\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n1\">1<\/div>\n\t\t\t\t\t\n\t\t\t\t<\/td>\n\t\t\t\t\n\t\t\t\t<td class=\"code\">\n\t\t\t\t\t<pre><div class=\"container\"><div class=\"line\"><code>$( <span class=\"hljs-string\">&quot;.selector&quot;<\/span> ).datepicker( <span class=\"hljs-string\">&quot;isDisabled&quot;<\/span> );<\/code><\/div><\/div><\/pre>\n\t\t\t\t<\/td>\n\t\t\t<\/tr>\n\t\t<\/tbody>\n\t<\/table>\n<\/div>\n\n<\/div>\n<\/div><\/div>\n<div id=\"method-refresh\"><div class=\"api-item\">\n<h3>refresh()<span class=\"returns\">Returns: <a href=\"http:\/\/api.jquery.com\/Types\/#jQuery\">jQuery<\/a> (<a href=\"http:\/\/learn.jquery.com\/jquery-ui\/widget-factory\/widget-method-invocation\/\">plugin only<\/a>)<\/span>\n<\/h3>\n<div>Redraw the date picker, after having made some external modifications.<\/div>\n<ul><li><div class=\"null-signature\">This method does not accept any arguments.<\/div><\/li><\/ul>\n<div>\n<strong>Code examples:<\/strong><p>Invoke the refresh method:<\/p>\n<div class=\"syntaxhighlighter javascript\">\n\t<table>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t\n\t\t\t\t<td class=\"gutter\">\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n1\">1<\/div>\n\t\t\t\t\t\n\t\t\t\t<\/td>\n\t\t\t\t\n\t\t\t\t<td class=\"code\">\n\t\t\t\t\t<pre><div class=\"container\"><div class=\"line\"><code>$( <span class=\"hljs-string\">&quot;.selector&quot;<\/span> ).datepicker( <span class=\"hljs-string\">&quot;refresh&quot;<\/span> );<\/code><\/div><\/div><\/pre>\n\t\t\t\t<\/td>\n\t\t\t<\/tr>\n\t\t<\/tbody>\n\t<\/table>\n<\/div>\n\n<\/div>\n<\/div><\/div>\n<div id=\"method-setDate\"><div class=\"api-item\">\n<h3>setDate( date )<span class=\"returns\">Returns: <a href=\"http:\/\/api.jquery.com\/Types\/#jQuery\">jQuery<\/a> (<a href=\"http:\/\/learn.jquery.com\/jquery-ui\/widget-factory\/widget-method-invocation\/\">plugin only<\/a>)<\/span>\n<\/h3>\n<div>Sets the date for the datepicker. The new date may be a <code>Date<\/code> object or a string in the current <a href=\"#option-dateFormat\">date format<\/a> (e.g., <code>&quot;01\/26\/2009&quot;<\/code>), a number of days from today (e.g., <code>+7<\/code>) or a string of values and periods (<code>&quot;y&quot;<\/code> for years, <code>&quot;m&quot;<\/code> for months, <code>&quot;w&quot;<\/code> for weeks, <code>&quot;d&quot;<\/code> for days, e.g., <code>&quot;+1m +7d&quot;<\/code>), or <code>null<\/code> to clear the selected date.<\/div>\n<ul><li>\n<div><strong>date<\/strong><\/div>\n<div>Type: <a href=\"http:\/\/api.jquery.com\/Types\/#Date\">Date<\/a>\n<\/div>\n<div>The new date.<\/div>\n<\/li><\/ul>\n<div>\n<strong>Code examples:<\/strong><p>Invoke the setDate method:<\/p>\n<div class=\"syntaxhighlighter javascript\">\n\t<table>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t\n\t\t\t\t<td class=\"gutter\">\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n1\">1<\/div>\n\t\t\t\t\t\n\t\t\t\t<\/td>\n\t\t\t\t\n\t\t\t\t<td class=\"code\">\n\t\t\t\t\t<pre><div class=\"container\"><div class=\"line\"><code>$( <span class=\"hljs-string\">&quot;.selector&quot;<\/span> ).datepicker( <span class=\"hljs-string\">&quot;setDate&quot;<\/span> );<\/code><\/div><\/div><\/pre>\n\t\t\t\t<\/td>\n\t\t\t<\/tr>\n\t\t<\/tbody>\n\t<\/table>\n<\/div>\n\n<\/div>\n<\/div><\/div>\n<div id=\"method-show\"><div class=\"api-item\">\n<h3>show()<span class=\"returns\">Returns: <a href=\"http:\/\/api.jquery.com\/Types\/#jQuery\">jQuery<\/a> (<a href=\"http:\/\/learn.jquery.com\/jquery-ui\/widget-factory\/widget-method-invocation\/\">plugin only<\/a>)<\/span>\n<\/h3>\n<div>Open the date picker. If the datepicker is attached to an input, the input must be visible for the datepicker to be shown.<\/div>\n<ul><li><div class=\"null-signature\">This method does not accept any arguments.<\/div><\/li><\/ul>\n<div>\n<strong>Code examples:<\/strong><p>Invoke the show method:<\/p>\n<div class=\"syntaxhighlighter javascript\">\n\t<table>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t\n\t\t\t\t<td class=\"gutter\">\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n1\">1<\/div>\n\t\t\t\t\t\n\t\t\t\t<\/td>\n\t\t\t\t\n\t\t\t\t<td class=\"code\">\n\t\t\t\t\t<pre><div class=\"container\"><div class=\"line\"><code>$( <span class=\"hljs-string\">&quot;.selector&quot;<\/span> ).datepicker( <span class=\"hljs-string\">&quot;show&quot;<\/span> );<\/code><\/div><\/div><\/pre>\n\t\t\t\t<\/td>\n\t\t\t<\/tr>\n\t\t<\/tbody>\n\t<\/table>\n<\/div>\n\n<\/div>\n<\/div><\/div><\/section><section class=\"entry-examples\" id=\"entry-examples\"><header><h2>Example:<\/h2><\/header><div class=\"entry-example\" id=\"example-0\">\n<p>A simple jQuery UI Datepicker.<\/p>\n<div class=\"syntaxhighlighter xml\">\n\t<table>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t\n\t\t\t\t<td class=\"gutter\">\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n1\">1<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n2\">2<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n3\">3<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n4\">4<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n5\">5<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n6\">6<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n7\">7<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n8\">8<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n9\">9<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n10\">10<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n11\">11<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n12\">12<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n13\">13<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n14\">14<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n15\">15<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n16\">16<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n17\">17<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n18\">18<\/div>\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n19\">19<\/div>\n\t\t\t\t\t\n\t\t\t\t<\/td>\n\t\t\t\t\n\t\t\t\t<td class=\"code\">\n\t\t\t\t\t<pre><div class=\"container\"><div class=\"line\"><code><span class=\"hljs-meta\">&lt;!doctype <span class=\"hljs-meta-keyword\">html<\/span>&gt;<\/span><\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">html<\/span> <span class=\"hljs-attr\">lang<\/span>=<span class=\"hljs-string\">&quot;en&quot;<\/span>&gt;<\/span><\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">head<\/span>&gt;<\/span><\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">meta<\/span> <span class=\"hljs-attr\">charset<\/span>=<span class=\"hljs-string\">&quot;utf-8&quot;<\/span>&gt;<\/span><\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">title<\/span>&gt;<\/span>datepicker demo<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">title<\/span>&gt;<\/span><\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">link<\/span> <span class=\"hljs-attr\">rel<\/span>=<span class=\"hljs-string\">&quot;stylesheet&quot;<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">&quot;\/\/code.jquery.com\/ui\/1.8.24\/themes\/base\/jquery-ui.css&quot;<\/span>&gt;<\/span><\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">script<\/span> <span class=\"hljs-attr\">src<\/span>=<span class=\"hljs-string\">&quot;\/\/code.jquery.com\/jquery-1.8.2.js&quot;<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">script<\/span>&gt;<\/span><\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">script<\/span> <span class=\"hljs-attr\">src<\/span>=<span class=\"hljs-string\">&quot;\/\/code.jquery.com\/ui\/1.8.24\/jquery-ui.js&quot;<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">script<\/span>&gt;<\/span><\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">head<\/span>&gt;<\/span><\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">body<\/span>&gt;<\/span><\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code> <\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">id<\/span>=<span class=\"hljs-string\">&quot;datepicker&quot;<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span><\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code> <\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">script<\/span>&gt;<\/span><span class=\"javascript\"><\/span><\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code>$( <span class=\"hljs-string\">&quot;#datepicker&quot;<\/span> ).datepicker();<\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">script<\/span>&gt;<\/span><\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code> <\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">body<\/span>&gt;<\/span><\/code><\/div><\/div><div class=\"container\"><div class=\"line\"><code><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">html<\/span>&gt;<\/span><\/code><\/div><\/div><\/pre>\n\t\t\t\t<\/td>\n\t\t\t<\/tr>\n\t\t<\/tbody>\n\t<\/table>\n<\/div>\n\n<h4>Demo:<\/h4>\n<div class=\"demo code-demo\" data-height=\"300\"><\/div>\n<\/div><\/section>\n<\/div><\/article>","protected":false},"excerpt":{"rendered":"<p>Select a date from a popup or inline calendar<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-22","post","type-post","status-publish","format-standard","hentry","category-widgets"],"_links":{"self":[{"href":"https:\/\/api.jqueryui.com\/1.8\/wp-json\/wp\/v2\/posts\/22","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/api.jqueryui.com\/1.8\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/api.jqueryui.com\/1.8\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/api.jqueryui.com\/1.8\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/api.jqueryui.com\/1.8\/wp-json\/wp\/v2\/comments?post=22"}],"version-history":[{"count":1,"href":"https:\/\/api.jqueryui.com\/1.8\/wp-json\/wp\/v2\/posts\/22\/revisions"}],"predecessor-version":[{"id":23,"href":"https:\/\/api.jqueryui.com\/1.8\/wp-json\/wp\/v2\/posts\/22\/revisions\/23"}],"wp:attachment":[{"href":"https:\/\/api.jqueryui.com\/1.8\/wp-json\/wp\/v2\/media?parent=22"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/api.jqueryui.com\/1.8\/wp-json\/wp\/v2\/categories?post=22"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/api.jqueryui.com\/1.8\/wp-json\/wp\/v2\/tags?post=22"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}