Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#6809 closed bug (worksforme)

DatePicker Bug: wrong days/weekdays structure in whole 2011

Reported by: goldman Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.datepicker Version: 1.8.7
Keywords: Cc:
Blocked by: Blocking:

Description

Check 2011 weekdays in demo: http://jqueryui.com/demos/datepicker/ All weekdays are wrong f.e new year in 01.01.2011 is saturday not sunday :)

To fix that search replace in your jquery-ui-1.8.6.custom.min.js file:

Buged line: t=(this._getFirstDayOfMonth(m,g)-h+7)%7; Fixed line: t=(this._getFirstDayOfMonth(m,g)-h+6)%7;

greets

Change History (4)

comment:1 Changed 9 years ago by Scott González

Component: ui.coreui.datepicker
Resolution: worksforme
Status: newclosed

This is working fine for me. Tested in git, 1.8.7, 1.8.6.

comment:2 Changed 7 years ago by toon81

I had the same problem in 1.8.16. The date picker thought the dates were on a weekday that is a day later than the actual weekday, for example it put November first, 2012 on a Friday instead of a Thursday. The fix mentioned above fixed this for me. So although Scott Gonzalez mentioned it works for him, it certainly does not for me (and presumably did not for goldman).

comment:3 Changed 7 years ago by tj.vantoll

@toon81 If you would like to look into this we're going to need a reduced test case showing the issue with the most recent version of jQuery UI (1.9.1). To get you started, use can use this boilerplate: http://jsfiddle.net/ZgAqH/ Open the link and click to "Fork" (in the top menu) to get started.

The dates look fine to me on the current demos - http://jqueryui.com/demos/datepicker/.

Thanks.

Version 0, edited 7 years ago by tj.vantoll (next)

comment:4 in reply to:  3 Changed 7 years ago by toon81

Replying to tj.vantoll:

@toon81 If you would like us to look into this we're going to need a reduced test case showing the issue with the most recent version of jQuery UI (1.9.1). To get started you use can use this boilerplate: http://jsfiddle.net/ZgAqH/ Open the link and click to "Fork" (in the top menu) to get started.

The dates look fine to me on the current demos - http://jqueryui.com/demos/datepicker/.

Thanks.

The demo works well for me, so guess I'm not suffering from this bug anymore. Oddly enough it seems to be gone in 1.8.16, too. I actually had to reverse the fix. So either I wasn't in fact using jquery UI 1.8.16 when I posted the earlier comment, or there's some other explanation for it.

Note: See TracTickets for help on using tickets.