Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#9508 closed bug (worksforme)

Datepicker: beforeShowDay completely broken

Reported by: stijnherreman Owned by:
Priority: minor Milestone: none
Component: ui.datepicker Version: 1.10.3
Keywords: Cc:
Blocked by: Blocking:

Description

Take the minified test case by scott.gonzalez on http://bugs.jqueryui.com/ticket/8953 Reproducible with that one (v1.9.2) and with the current v1.10.3 at http://jsfiddle.net/UwLEy/

Output on IE 10:

Sun Jul 28 00:00:00 UTC+0200 2013 
Mon Jul 29 00:00:00 UTC+0200 2013 
...
Fri Oct 4 00:00:00 UTC+0200 2013 
Sat Oct 5 00:00:00 UTC+0200 2013 

Output on Firefox 23

Date {Sun Jul 28 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Mon Jul 29 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Tue Jul 30 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Wed Jul 31 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Thu Aug 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Fri Aug 02 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sat Aug 03 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Sep 01 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}
Date {Sun Oct 06 2013 00:00:00 GMT+0200 (Romance Standard Time)}

Output on Chrome:

Sun Jul 28 2013 00:00:00 GMT+0200 (Romance Daylight Time)
Mon Jul 29 2013 00:00:00 GMT+0200 (Romance Daylight Time)
..
Fri Oct 04 2013 00:00:00 GMT+0200 (Romance Daylight Time)
Sat Oct 05 2013 00:00:00 GMT+0200 (Romance Daylight Time)

However, I swear just a few minutes ago I observed the same behaviour as Firefox in Chrome. And so did my colleague on his pc, so no I am not going insane.

What's going on?

Change History (3)

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

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

Presumably you're leaving the console closed while logging. There's no problem with the callback.

comment:2 Changed 6 years ago by stijnherreman

Opening the console after it has run on Chrome is indeed a way to reproduce it. But on Firefox, even if the console is open and you re-run the test, the same results are produced.

Is this a browser issue then?

comment:3 Changed 6 years ago by Scott González

Yes. If you try to actually do anything useful, you'll notice there are no problems. You can also log the toString of the date...

Note: See TracTickets for help on using tickets.