{"id":14677,"date":"2012-08-21T21:01:30","date_gmt":"2012-08-21T13:01:30","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=14677"},"modified":"2025-04-04T01:11:41","modified_gmt":"2025-04-03T17:11:41","slug":"jquery-ui-datepicker","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/jquery-ui-datepicker\/","title":{"rendered":"How to Customize and Theme the jQuery UI Datepicker"},"content":{"rendered":"<p>jQuery UI is very user-friendly and is popular on many websites needing interactive features.<\/p>\n<p>In this post, we\u2019ll explore one of its features, the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/jqueryui.com\/demos\/datepicker\/\">Datepicker widget<\/a>.<\/p>\n<p>We\u2019ll learn how to customize the calendar theme, so you can create a theme that matches your overall design. However, you need a basic understanding of JavaScript and familiarity with CSS before following this tutorial.<\/p>\n<p><a href=\"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-datepicker\/demo\/datepicker\/index.html\" class=\"su-button su-button-style-flat\" style=\"color:#FFFFFF;background-color:#2D89EF;border-color:#246ec0;border-radius:0px\" target=\"__blank\" rel=\"noopener nofollow\"><span style=\"color:#FFFFFF;padding:7px 20px;font-size:16px;line-height:24px;border-color:#6cadf4;border-radius:0px;text-shadow:none\"><i class=\"sui sui-external-link\" style=\"font-size:16px;color:#fff\"><\/i>  Demo <\/span><\/a>\n<a href=\"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-datepicker\/demo\/datepicker\/source.zip\" class=\"su-button su-button-style-flat\" style=\"color:#FFFFFF;background-color:#2D89EF;border-color:#246ec0;border-radius:0px\" target=\"__blank\" rel=\"noopener nofollow\"><span style=\"color:#FFFFFF;padding:7px 20px;font-size:16px;line-height:24px;border-color:#6cadf4;border-radius:0px;text-shadow:none\"><i class=\"sui sui-external-link\" style=\"font-size:16px;color:#fff\"><\/i>  Download Source <\/span><\/a><\/p>\n<p>If you\u2019re ready, let\u2019s get started.<\/p>\n<h2>The Assets<\/h2>\n<p>Let\u2019s prepare some essential assets for the calendar.<\/p>\n<p>First, the calendar design will refer to this <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.premiumpixels.com\/freebies\/pretty-little-calendar-psd\/\">PSD file from Premium Pixels<\/a>. So, download it first to help us pick the sample colors we need. Then, download two patterns from <em>Subtle Patterns<\/em> that we will use as the background of our calendar. In this example, we decided to use the following patterns: <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.toptal.com\/designers\/subtlepatterns\/?p=158\">black denim<\/a> and <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.toptal.com\/designers\/subtlepatterns\/?p=678\">dark leather<\/a>.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-datepicker\/img2.jqueryui-patterns.jpg\" alt=\"Pattern samples for calendar design\" width=\"500\" height=\"300\"><\/figure>\n<p>We will also need a web development tool like <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/getfirebug.com\/\" class=\"external\">Firebug<\/a> to inspect element classes\/ids generated by the jQuery UI.<\/p>\n<p>Well, I think we\u2019ve had enough preparation. Now let\u2019s go to the first step.<\/p>\n<h3>Step 1: jQuery UI Datepicker<\/h3>\n<p>First, go to the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/jqueryui.com\/download\" class=\"external\">jQuery UI download page<\/a>. Here, you\u2019ll see several options: UI Core, Widgets, Interactions, and Effects.<\/p>\n<p>We should <strong>deselect all the components<\/strong> because we don\u2019t need all of them.<\/p>\n<p>Then, in the <strong>Widgets<\/strong> section, select only the datepicker. The jQuery UI will automatically select the necessary dependencies, and then you can <strong>download<\/strong> the file.<\/p>\n<p>Link all the downloaded files \u2014 <em>except the CSS<\/em> \u2014 to your HTML blank document as follows:<\/p>\n<pre>\r\n&lt;script type=\"text\/javascript\" src=\"js\/jquery-1.7.1.min.js\"&gt;&lt;\/script&gt;\r\n&lt;script type=\"text\/javascript\" src=\"js\/jquery-ui-1.8.18.custom.min.js\"&gt;&lt;\/script&gt;\r\n<\/pre>\n<h3>Step 2: Customizing the Datepicker<\/h3>\n<p>In this step, we will configure a datepicker with the following options:<\/p>\n<pre>\r\n&lt;script type=\"text\/javascript\"&gt;\r\n $(function(){\r\n   $('#datepicker').datepicker({\r\n     inline: true,\r\n     showOtherMonths: true,\r\n     dayNamesMin: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\r\n   });\r\n });\r\n&lt;\/script&gt;\r\n<\/pre>\n<p>The above code will instruct jQuery to display the calendar on an element with the <code>datepicker<\/code> id. So, we need to add the following <code>div<\/code> tag with the \u2014 datepicker ID \u2014 in the body section to form the calendar:<\/p>\n<pre>\r\n&lt;div id=\"datepicker\"&gt;&lt;\/div&gt;\r\n<\/pre>\n<p>Now, the calendar should have been generated and will appear plain without any styles but still functional.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-datepicker\/img3.plain-calendar.jpg\" alt=\"Plain calendar generated by jQuery UI Datepicker\" width=\"500\" height=\"300\"><\/figure>\n<h3>Step 3: The Styles<\/h3>\n<p>Now let\u2019s begin styling the calendar. We will start by normalizing all the elements and creating a new stylesheet. In this example, we name it <code>datepicker.css<\/code>. Then, link them all to the HTML document.<\/p>\n<pre>\r\n&lt;link href=\"css\/normalize.css\" rel=\"stylesheet\" type=\"text\/css\"\/&gt;\r\n&lt;link href=\"css\/datepicker.css\" rel=\"stylesheet\" type=\"text\/css\"\/&gt;\r\n<\/pre>\n<p>Next, we will first attach a background to the body so our HTML doesn\u2019t look too plain.<\/p>\n<pre>\r\nbody {\r\n  background: url('..\/img\/darkdenim3.png') repeat 0 0 #555;\r\n}\r\n<\/pre>\n<p>Next, we will specify the datepicker\u2019s width, position it in the center, and add a drop shadow to give a prominent effect to the calendar.<\/p>\n<pre>\r\n.ui-datepicker {\r\n  width: 216px;\r\n  height: auto;\r\n  margin: 5px auto 0;\r\n  font: 9pt Arial, sans-serif;\r\n  -webkit-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, .5);\r\n  -moz-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, .5);\r\n  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, .5);\r\n}\r\n<\/pre>\n<p>We will also remove the default underline decoration from every anchor tag.<\/p>\n<pre>\r\n.ui-datepicker a {\r\n  text-decoration: none;\r\n}\r\n<\/pre>\n<p>The calendar in jQuery UI is formed with a <code>table<\/code>. So, let\u2019s add <code>100%<\/code> width for the <code>table<\/code>, so it will have the same maximum width as the wrapper above; that is <code>216px<\/code>.<\/p>\n<pre>\r\n.ui-datepicker table {\r\n  width: 100%;\r\n}\r\n<\/pre>\n<h2>Styling the Header Section<\/h2>\n<p>The datepicker has a header section containing <strong>Month & Year<\/strong> of the calendar. This section will have the dark leather texture we\u2019ve downloaded before, with slightly white font color and a <code>1px<\/code> white shadow at the top.<\/p>\n<pre>\r\n.ui-datepicker-header {\r\n  background: url('..\/img\/dark_leather.png') repeat 0 0 #000;\r\n  color: #e0e0e0;\r\n  font-weight: bold;\r\n  -webkit-box-shadow: inset 0px 1px 1px 0px rgba(250, 250, 250, 0.2);\r\n  -moz-box-shadow: inset 0px 1px 1px 0px rgba(250, 250, 250, 0.2);\r\n  box-shadow: inset 0px 1px 1px 0px rgba(250, 250, 250, 0.2);\r\n  text-shadow: 1px -1px 0px #000;\r\n  filter: dropshadow(color=#000, offx=1, offy=-1);\r\n  line-height: 30px;\r\n  border-width: 1px 0 0 0;\r\n  border-style: solid;\r\n  border-color: #111;\r\n}\r\n<\/pre>\n<p>Next, let\u2019s center the <strong>Month<\/strong> position.<\/p>\n<pre>\r\n.ui-datepicker-title {\r\n  text-align: center;\r\n}\r\n<\/pre>\n<p>Replace the <strong>Next<\/strong> and <strong>Prev<\/strong> text with the sprite arrow images sliced from the PSD.<\/p>\n<pre>\r\n.ui-datepicker-prev, .ui-datepicker-next {\r\n  display: inline-block;\r\n  width: 30px;\r\n  height: 30px;\r\n  text-align: center;\r\n  cursor: pointer;\r\n  background-image: url('..\/img\/arrow.png');\r\n  background-repeat: no-repeat;\r\n  line-height: 600%;\r\n  overflow: hidden;\r\n}\r\n<\/pre>\n<p>Then, adjust the arrow position respectively.<\/p>\n<pre>\r\n.ui-datepicker-prev {\r\n  float: left;\r\n  background-position: center -30px;\r\n}\r\n.ui-datepicker-next {\r\n  float: right;\r\n  background-position: center 0px;\r\n}\r\n<\/pre>\n<p>While the <strong>day names<\/strong> section is wrapped within a <code>thead<\/code>, based on our design reference, it will have a slightly white gradient. To simplify our task, we will use <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.colorzilla.com\/gradient-editor\/\" class=\"external\">this tool<\/a> to generate the gradient code:<\/p>\n<pre>\r\n.ui-datepicker thead {\r\n  background-color: #f7f7f7;\r\n  background-image: -moz-linear-gradient(top, #f7f7f7 0%, #f1f1f1 100%);\r\n  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f7f7f7), color-stop(100%,#f1f1f1));\r\n  background-image: -webkit-linear-gradient(top, #f7f7f7 0%,#f1f1f1 100%);\r\n  background-image: -o-linear-gradient(top, #f7f7f7 0%,#f1f1f1 100%);\r\n  background-image: -ms-linear-gradient(top, #f7f7f7 0%,#f1f1f1 100%);\r\n  background-image: linear-gradient(top, #f7f7f7 0%,#f1f1f1 100%);\r\n  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f7f7f7', endColorstr='#f1f1f1',GradientType=0 );\r\n  border-bottom: 1px solid #bbb;\r\n}\r\n<\/pre>\n<p>The <strong>day names<\/strong> text will have a dark grey color of <code>#666666<\/code> and will also have a thin white <code>text-shadow<\/code> to give it a pressed effect.<\/p>\n<pre>\r\n.ui-datepicker th {\r\n  text-transform: uppercase;\r\n  font-size: 6pt;\r\n  padding: 5px 0;\r\n  color: #666666;\r\n  text-shadow: 1px 0px 0px #fff;\r\n  filter: dropshadow(color=#fff, offx=1, offy=0);\r\n}\r\n<\/pre>\n<p>At this point, the calendar will appear like this:<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-datepicker\/img4.first-look.jpg\" alt=\"First look at styled calendar\" width=\"500\" height=\"300\"><\/figure>\n<h2>Styling the Dates<\/h2>\n<p>The calendar dates are wrapped within <code>td<\/code> or table data. So, we will set the padding to <code>0<\/code> to remove the spaces between the <code>td<\/code> and give it a right border of 1px.<\/p>\n<pre>\r\n.ui-datepicker tbody td {\r\n  padding: 0;\r\n  border-right: 1px solid #bbb;\r\n}\r\n<\/pre>\n<p>Except for the last <code>td<\/code>, which will not have a right border. We set the right border to 0 for this.<\/p>\n<pre>\r\n.ui-datepicker tbody td:last-child {\r\n  border-right: 0px;\r\n}\r\n<\/pre>\n<p>The table row will be almost the same. It will have a 1px border bottom except for the last row.<\/p>\n<pre>\r\n.ui-datepicker tbody tr {\r\n  border-bottom: 1px solid #bbb;\r\n}\r\n.ui-datepicker tbody tr:last-child {\r\n  border-bottom: 0px;\r\n}\r\n<\/pre>\n<h2>Styling the Default, Hover, and Active State<\/h2>\n<p>In this step, we will define the date hover and active styles. We will first define the date default state by specifying the dimensions, centering the date text position, adding gradient color, and inner white shadow.<\/p>\n<pre>\r\n.ui-datepicker td span, .ui-datepicker td a {\r\n  display: inline-block;\r\n  font-weight: bold;\r\n  text-align: center;\r\n  width: 30px;\r\n  height: 30px;\r\n  line-height: 30px;\r\n  color: #666666;\r\n  text-shadow: 1px 1px 0px #fff;\r\n  filter: dropshadow(color=#fff, offx=1, offy=1);\r\n}\r\n.ui-datepicker-calendar .ui-state-default {\r\n  background: #ededed;\r\n  background: -moz-linear-gradient(top, #ededed 0%, #dedede 100%);\r\n  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(100%,#dedede));\r\n  background: -webkit-linear-gradient(top, #ededed 0%,#dedede 100%);\r\n  background: -o-linear-gradient(top, #ededed 0%,#dedede 100%);\r\n  background: -ms-linear-gradient(top, #ededed 0%,#dedede 100%);\r\n  background: linear-gradient(top, #ededed 0%,#dedede 100%);\r\n  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ededed', endColorstr='#dedede',GradientType=0 );\r\n  -webkit-box-shadow: inset 1px 1px 0px 0px rgba(250, 250, 250, .5);\r\n  -moz-box-shadow: inset 1px 1px 0px 0px rgba(250, 250, 250, .5);\r\n  box-shadow: inset 1px 1px 0px 0px rgba(250, 250, 250, .5);\r\n}\r\n.ui-datepicker-unselectable .ui-state-default {\r\n  background: #f4f4f4;\r\n  color: #b4b3b3;\r\n}\r\n<\/pre>\n<p>When you hover over the date, it will turn slightly white.<\/p>\n<pre>\r\n.ui-datepicker-calendar .ui-state-hover {\r\n  background: #f7f7f7;\r\n}\r\n<\/pre>\n<p>When the date is in an active state, it will have the following styles.<\/p>\n<pre>\r\n.ui-datepicker-calendar .ui-state-active {\r\n  background: #6eafbf;\r\n  -webkit-box-shadow: inset 0px 0px 10px 0px rgba(0, 0, 0, .1);\r\n  -moz-box-shadow: inset 0px 0px 10px 0px rgba(0, 0, 0, .1);\r\n  box-shadow: inset 0px 0px 10px 0px rgba(0, 0, 0, .1);\r\n  color: #e0e0e0;\r\n  text-shadow: 0px 1px 0px #4d7a85;\r\n  filter: dropshadow(color=#4d7a85, offx=0, offy=1);\r\n  border: 1px solid #55838f;\r\n  position: relative;\r\n  margin: -1px;\r\n}\r\n<\/pre>\n<p>Now, the calendar should look much better.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-datepicker\/img5.cal-lookgood.jpg\" alt=\"Styled calendar looks good\" width=\"500\" height=\"300\"><\/figure>\n<h2>Fixing the Position<\/h2>\n<p>At this point, look at the date carefully. When you click on the date in the first or last column, you will notice that the active state is overflowing a pixel off the calendar edge.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-datepicker\/img6.cal-overflowing.jpg\" alt=\"Active state overflowing calendar edge\" width=\"500\" height=\"300\"><\/figure>\n<p>So here, we will make some small fixes.<\/p>\n<p>First, we will decrease the date width to <code>29px<\/code>, and set the right margin of the last column and the left margin of the first column to <code>0<\/code> to reverse the <code>-1px<\/code> margin we have set previously for the active state.<\/p>\n<pre>\r\n.ui-datepicker-calendar td:first-child .ui-state-active {\r\n  width: 29px;\r\n  margin-left: 0;\r\n}\r\n.ui-datepicker-calendar td:last-child .ui-state-active {\r\n  width: 29px;\r\n  margin-right: 0;\r\n}\r\n<\/pre>\n<p>The date at the last row of the calendar will also have a similar treatment.<\/p>\n<pre>\r\n.ui-datepicker-calendar tr:last-child .ui-state-active {\r\n  height: 29px;\r\n  margin-bottom: 0;\r\n}\r\n<\/pre>\n<p>Now, let\u2019s see the result. The calendar now looks beautiful and fits perfectly as our design reference. You can see the demo and download the source to examine the code from the links below the image.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-datepicker\/img7.prefect-fit.jpg\" alt=\"Styled calendar fits perfectly\" width=\"500\" height=\"300\"><\/figure>\n<p><a href=\"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-datepicker\/demo\/datepicker\/index.html\" class=\"su-button su-button-style-flat\" style=\"color:#FFFFFF;background-color:#2D89EF;border-color:#246ec0;border-radius:0px\" target=\"__blank\" rel=\"noopener nofollow\"><span style=\"color:#FFFFFF;padding:7px 20px;font-size:16px;line-height:24px;border-color:#6cadf4;border-radius:0px;text-shadow:none\"><i class=\"sui sui-external-link\" style=\"font-size:16px;color:#fff\"><\/i>  Demo <\/span><\/a>\n<a href=\"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-datepicker\/demo\/datepicker\/source.zip\" class=\"su-button su-button-style-flat\" style=\"color:#FFFFFF;background-color:#2D89EF;border-color:#246ec0;border-radius:0px\" target=\"__blank\" rel=\"noopener nofollow\"><span style=\"color:#FFFFFF;padding:7px 20px;font-size:16px;line-height:24px;border-color:#6cadf4;border-radius:0px;text-shadow:none\"><i class=\"sui sui-external-link\" style=\"font-size:16px;color:#fff\"><\/i>  Download Source <\/span><\/a><\/p>\n<h2>Bonus: Extend the Calendar<\/h2>\n<p>Today, we have learned quite a lot about how to create a custom theme for jQuery UI Datepicker. But you shouldn\u2019t stop here, as there are still many things that can be extended from this datepicker. Depending on your jQuery and CSS proficiency, you can extend the calendar to be like this \u2013 a text input with an overlay datepicker.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-datepicker\/img8.alt2.jpg\" alt=\"Extended calendar with text input\" width=\"500\" height=\"300\"><\/figure>\n<p><a href=\"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-datepicker\/demo\/datepicker.ext\/index.html\" class=\"su-button su-button-style-flat\" style=\"color:#FFFFFF;background-color:#2D89EF;border-color:#246ec0;border-radius:0px\" target=\"__blank\" rel=\"noopener nofollow\"><span style=\"color:#FFFFFF;padding:7px 20px;font-size:16px;line-height:24px;border-color:#6cadf4;border-radius:0px;text-shadow:none\"><i class=\"sui sui-external-link\" style=\"font-size:16px;color:#fff\"><\/i>  Demo <\/span><\/a>\n<a href=\"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-datepicker\/demo\/datepicker\/source.zip\" class=\"su-button su-button-style-flat\" style=\"color:#FFFFFF;background-color:#2D89EF;border-color:#246ec0;border-radius:0px\" target=\"__blank\" rel=\"noopener nofollow\"><span style=\"color:#FFFFFF;padding:7px 20px;font-size:16px;line-height:24px;border-color:#6cadf4;border-radius:0px;text-shadow:none\"><i class=\"sui sui-external-link\" style=\"font-size:16px;color:#fff\"><\/i>  Download Source <\/span><\/a><\/p>\n<h3>Further Reading<\/h3>\n<p>For further reading on jQuery UI, you can read the complete documentation here:<\/p>\n<ul>\n<li><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/learn.jquery.com\/jquery-ui\/getting-started\/\">Getting Started with jQuery UI<\/a><\/li>\n<li><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/api.jqueryui.com\/category\/theming\/\">Theming jQuery UI<\/a><\/li>\n<li><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/api.jqueryui.com\/category\/theming\/\">jQuery UI: Theming API classes<\/a><\/li>\n<\/ul>\n<h2>Final Thoughts<\/h2>\n<p>Thank you for reading and following this tutorial. I hope you find it useful. If you have any feedback or would like to add things that might be missing from this tutorial, feel free to point it out in the comment section below. Thanks again.<\/p>","protected":false},"excerpt":{"rendered":"<p>jQuery UI is very user-friendly and is popular on many websites needing interactive features. In this post, we\u2019ll explore one of its features, the Datepicker widget. We\u2019ll learn how to customize the calendar theme, so you can create a theme that matches your overall design. However, you need a basic understanding of JavaScript and familiarity&hellip;<\/p>\n","protected":false},"author":113,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3392,3395,352],"tags":[4102,911],"topic":[4520],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Customize and Theme the jQuery UI Datepicker - Hongkiat<\/title>\n<meta name=\"description\" content=\"jQuery UI is very user-friendly and is popular on many websites needing interactive features. In this post, we&#039;ll explore one of its features, the\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/jquery-ui-datepicker\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Customize and Theme the jQuery UI Datepicker\" \/>\n<meta property=\"og:description\" content=\"jQuery UI is very user-friendly and is popular on many websites needing interactive features. In this post, we&#039;ll explore one of its features, the\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/jquery-ui-datepicker\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2012-08-21T13:01:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-03T17:11:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-datepicker\/img2.jqueryui-patterns.jpg\" \/>\n<meta name=\"author\" content=\"Thoriq Firdaus\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@tfirdaus\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Thoriq Firdaus\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/jquery-ui-datepicker\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/jquery-ui-datepicker\\\/\"},\"author\":{\"name\":\"Thoriq Firdaus\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e7948c7a175d211496331e4b6ce55807\"},\"headline\":\"How to Customize and Theme the jQuery UI Datepicker\",\"datePublished\":\"2012-08-21T13:01:30+00:00\",\"dateModified\":\"2025-04-03T17:11:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/jquery-ui-datepicker\\\/\"},\"wordCount\":1188,\"commentCount\":29,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/jquery-ui-datepicker\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/jquery-ui-datepicker\\\/img2.jqueryui-patterns.jpg\",\"keywords\":[\"Interface Design\",\"jQuery\"],\"articleSection\":[\"Coding\",\"UI\\\/UX\",\"Web Design\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/jquery-ui-datepicker\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/jquery-ui-datepicker\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/jquery-ui-datepicker\\\/\",\"name\":\"How to Customize and Theme the jQuery UI Datepicker - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/jquery-ui-datepicker\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/jquery-ui-datepicker\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/jquery-ui-datepicker\\\/img2.jqueryui-patterns.jpg\",\"datePublished\":\"2012-08-21T13:01:30+00:00\",\"dateModified\":\"2025-04-03T17:11:41+00:00\",\"description\":\"jQuery UI is very user-friendly and is popular on many websites needing interactive features. In this post, we'll explore one of its features, the\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/jquery-ui-datepicker\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/jquery-ui-datepicker\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/jquery-ui-datepicker\\\/#primaryimage\",\"url\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/jquery-ui-datepicker\\\/img2.jqueryui-patterns.jpg\",\"contentUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/jquery-ui-datepicker\\\/img2.jqueryui-patterns.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/jquery-ui-datepicker\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Customize and Theme the jQuery UI Datepicker\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e7948c7a175d211496331e4b6ce55807\",\"name\":\"Thoriq Firdaus\",\"description\":\"Thoriq is a writer for Hongkiat.com with a passion for web design and development. He is the author of Responsive Web Design by Examples, where he covered his best approaches in developing responsive websites quickly with a framework.\",\"sameAs\":[\"https:\\\/\\\/thoriq.com\",\"https:\\\/\\\/x.com\\\/tfirdaus\"],\"jobTitle\":\"Web Developer\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/thoriq\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Customize and Theme the jQuery UI Datepicker - Hongkiat","description":"jQuery UI is very user-friendly and is popular on many websites needing interactive features. In this post, we'll explore one of its features, the","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hongkiat.com\/blog\/jquery-ui-datepicker\/","og_locale":"en_US","og_type":"article","og_title":"How to Customize and Theme the jQuery UI Datepicker","og_description":"jQuery UI is very user-friendly and is popular on many websites needing interactive features. In this post, we'll explore one of its features, the","og_url":"https:\/\/www.hongkiat.com\/blog\/jquery-ui-datepicker\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2012-08-21T13:01:30+00:00","article_modified_time":"2025-04-03T17:11:41+00:00","og_image":[{"url":"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-datepicker\/img2.jqueryui-patterns.jpg","type":"","width":"","height":""}],"author":"Thoriq Firdaus","twitter_card":"summary_large_image","twitter_creator":"@tfirdaus","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Thoriq Firdaus","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/jquery-ui-datepicker\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/jquery-ui-datepicker\/"},"author":{"name":"Thoriq Firdaus","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e7948c7a175d211496331e4b6ce55807"},"headline":"How to Customize and Theme the jQuery UI Datepicker","datePublished":"2012-08-21T13:01:30+00:00","dateModified":"2025-04-03T17:11:41+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/jquery-ui-datepicker\/"},"wordCount":1188,"commentCount":29,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/jquery-ui-datepicker\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-datepicker\/img2.jqueryui-patterns.jpg","keywords":["Interface Design","jQuery"],"articleSection":["Coding","UI\/UX","Web Design"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hongkiat.com\/blog\/jquery-ui-datepicker\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/jquery-ui-datepicker\/","url":"https:\/\/www.hongkiat.com\/blog\/jquery-ui-datepicker\/","name":"How to Customize and Theme the jQuery UI Datepicker - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/jquery-ui-datepicker\/#primaryimage"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/jquery-ui-datepicker\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-datepicker\/img2.jqueryui-patterns.jpg","datePublished":"2012-08-21T13:01:30+00:00","dateModified":"2025-04-03T17:11:41+00:00","description":"jQuery UI is very user-friendly and is popular on many websites needing interactive features. In this post, we'll explore one of its features, the","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/jquery-ui-datepicker\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/jquery-ui-datepicker\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/jquery-ui-datepicker\/#primaryimage","url":"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-datepicker\/img2.jqueryui-patterns.jpg","contentUrl":"https:\/\/assets.hongkiat.com\/uploads\/jquery-ui-datepicker\/img2.jqueryui-patterns.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/jquery-ui-datepicker\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Customize and Theme the jQuery UI Datepicker"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e7948c7a175d211496331e4b6ce55807","name":"Thoriq Firdaus","description":"Thoriq is a writer for Hongkiat.com with a passion for web design and development. He is the author of Responsive Web Design by Examples, where he covered his best approaches in developing responsive websites quickly with a framework.","sameAs":["https:\/\/thoriq.com","https:\/\/x.com\/tfirdaus"],"jobTitle":"Web Developer","url":"https:\/\/www.hongkiat.com\/blog\/author\/thoriq\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-3OJ","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/14677","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/113"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=14677"}],"version-history":[{"count":4,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/14677\/revisions"}],"predecessor-version":[{"id":73541,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/14677\/revisions\/73541"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=14677"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=14677"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=14677"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=14677"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}