Opened 15 years ago

Closed 15 years ago

#3105 closed bug (fixed)

Date picker first week in november day repeat

Reported by: [email protected] Owned by: kbwood
Priority: critical Milestone:
Component: ui.datepicker Version: 1.5.1
Keywords: Cc:
Blocked by: Blocking:


I've got the following UI datepicker options and it is generating the first Sunday in November twice (1,2,3,4,4,5 for Nov 07 for example) which throws off every day in November as well as what are registered as weekends. This is actually in 1.5.2 but it won't let me select that version

		minDate: new Date(2008, 1 - 1, 1),
		maxDate: new Date(2010, 1 - 1, 1),
		rangeSelect: true,
		numberOfMonths: 5,
		changeMonth: false,
		changeYear: false,
		statusForDate: highlightToday,
		//beforeShowDay: $.datepicker.noWeekends, 
	}).children("div").css("width","100%").css("margin","0 auto");

function highlightToday(date, inst) {  
    var today = new Date();  
    today = new Date(today.getFullYear(), today.getMonth(), today.getDate());  
    return $.datepicker.dateStatus(date, inst) +  
        (today.getTime() == date.getTime() ? ' (today)' : '');  

Change History (5)

comment:1 Changed 15 years ago by kbwood

Owner: changed from grabanski to kbwood
Status: newassigned

This should have been fixed in 1.5.2. It was found to be a problem with specific time zones and the shift to/from summer time.

What time zone are you in?

comment:2 Changed 15 years ago by jstayton

I have upgraded to 1.5.2 and still see "1, 2, 2, 3, 4, ..." for November '08 and "1, 1, 2, 3, ..." for November '09.

The server this is running on is in CST.

comment:3 Changed 15 years ago by kbwood

It's the client time zone that is important as this is where the datepicker is rendered. What country/city is your time zone set to? (I've no idea what CST is.)

comment:4 Changed 15 years ago by jstayton

Sorry for not getting back to you sooner, kbwood.

I have experienced this in GMT -06:00 (Texas, United States) and GMT -08:00 (California, United States).

comment:5 Changed 15 years ago by kbwood

Resolution: fixed
Status: assignedclosed

Fixed. Check both UTC and normal date to step through the days.

Note: See TracTickets for help on using tickets.