Skip to main content

Search and Top Navigation

#14910 closed bug (duplicate)

Opened January 25, 2016 10:30AM UTC

Closed January 25, 2016 03:23PM UTC

Datepicker: showWeek doesn't show the right calendar week if firstDay is 0 and year is 2016

Reported by: dasago87 Owned by:
Priority: minor Milestone:
Component: ui.datepicker Version: 1.11.0
Keywords: datepicker calendar showWeek Cc:
Blocked by: Blocking:

If showWeek = true, firstDay = 0 and the year is 2016 the displayed calendar week is wrong. The first calendarWeek start at 10. January instead of 3. January. If firstDay is 1 it is fine. The first calendar week starts at 4. January.

<!doctype html>
<html lang="en">
  <meta charset="utf-8">
  <title>jQuery UI Datepicker - Show week of the year</title>
  <link rel="stylesheet" href="//">
  <script src="//"></script>
  <script src="//"></script>
  <link rel="stylesheet" href="/resources/demos/style.css">
  $(function() {
    $( "#datepicker" ).datepicker({
      showWeek: true,
      firstDay: 0
<p>Date: <input type="text" id="datepicker"></p>
Attachments (0)
Change History (2)

Changed January 25, 2016 10:36AM UTC by dasago87 comment:1

_comment0: [,js,output Example added in JS Bin]1453718335425230

Changed January 25, 2016 03:23PM UTC by scottgonzalez comment:2

resolution: → duplicate
status: newclosed

Duplicate of #14907.