Opened 5 years ago

Closed 5 years ago

#14910 closed bug (duplicate)

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:

Description

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">
<head>
  <meta charset="utf-8">
  <title>jQuery UI Datepicker - Show week of the year</title>
  <link rel="stylesheet" href="//code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.css">
  <script src="//code.jquery.com/jquery-1.10.2.js"></script>
  <script src="//code.jquery.com/ui/1.11.0/jquery-ui.js"></script>
  <link rel="stylesheet" href="/resources/demos/style.css">
  <script>
  $(function() {
    $( "#datepicker" ).datepicker({
      showWeek: true,
      firstDay: 0
    });
  });
  </script>
</head>
<body>
 
<p>Date: <input type="text" id="datepicker"></p>
 
 
</body>
</html>

Change History (2)

comment:1 Changed 5 years ago by dasago87

Last edited 5 years ago by dasago87 (previous) (diff)

comment:2 Changed 5 years ago by Scott González

Resolution: duplicate
Status: newclosed

Duplicate of #14907.

Note: See TracTickets for help on using tickets.