Opened 9 years ago

Closed 9 years ago

#9506 closed bug (invalid)

datepicker erroneously marks weekday as weekend with "ui-datepicker-week-end" CSS style

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


when trying to highlight weekends such as

.ui-datepicker-week-end a { color: red !important; }

its erroneously marks weekday as weekend and skip one week-end-day for demonstration :

FIX: just edit two lines in jquery-ui-1.10.3.js

lines 9326

((dow + firstDay + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + // highlight weekends

as ((dow + firstDay) % 7 >= 5 ? " ui-datepicker-week-end" : "") + highlight


line 9302

thead += "<th" + ((dow + firstDay + 6) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "") + ">" +


thead += "<th" + ((dow + firstDay) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "") + ">" +

Change History (4)

comment:1 Changed 9 years ago by cemmerven

I was accidentally paste wrong URL for demonstration

comment:2 Changed 9 years ago by cemmerven

It looks like seting firstDay other than "zero" like firstDay(1) firstDay(2) affects its behaviour and its inconsistent between browsers (IE10 and chrome). I have also refresh browser cache with (ctrl + F5).

comment:3 Changed 9 years ago by tj.vantoll

Owner: set to cemmerven
Status: newpending

Hi cemmerven,

Thanks for taking the time to contribute to the jQuery UI project. Your test case was using an old version of UI: but regardless I'm not seeing an issue in either.

For me all Saturdays and Sundays are red. What am I missing?

comment:4 Changed 9 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.