jQuery UI & Datepicker: Show the week of the year

This entry is part 2 of 14 in the series jQuery UI Datepicker

jQuery UI Datepicker – Show week of the year

The datepicker can show the week of the year.  There are 52 weeks to a year.  

The default calculation follows the ISO 8601 definition: the week starts on Monday, the first week of the year contains the first Thursday of the year.

This means that some days from one year may be placed into weeks ‘belonging’ to another year.

<!doctype html>
<html lang='en'>
    <meta charset='utf-8'>
    <title>jQuery UI Datepicker - Show week of the year</title>
    <link rel='stylesheet' href='//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css'>
    <script src='//code.jquery.com/jquery-1.10.2.js'></script>
    <script src='//code.jquery.com/ui/1.10.4/jquery-ui.js'></script>
    <link rel='stylesheet' href='https://codecrawl.com/code/jqueryui/jqueryui_style.css'>
        $(function () {
                showWeek: true,
                firstDay: 1

<p>Date: <input type='text' id='datepicker'></p>

Try The Code Datepicker Widgets API Doc
Series Navigation<< jQuery UI & Datepicker: Basic datepicker
jQuery UI & Datepicker: Datepicker with animations >>