Opened 14 years ago

Closed 14 years ago

Last modified 10 years ago

#3642 closed bug (fixed)

firstDay displays Day names incorrectly in multi-month view

Reported by: ruler Owned by:
Priority: minor Milestone:
Component: ui.datepicker Version: 1.6rc2
Keywords: Cc:
Blocked by: Blocking:


A picture is worth a thousand words:

Note the days of the week are:

We Sa Tu Fr Mo Th Su

firstDay is "3"

Haven't figured out the fix yet, but should be easy, I assume.

Change History (3)

comment:1 Changed 14 years ago by ruler

This issue occurs when firstDay is passed as a string. Since I pass things from PHP using json_encode, this may happen more often than not. (Need to double-check this in PHP, although no matter)

The fix is to change line 1399 of ui.datepicker.js 1.6rc2 from:

var firstDay = this._get(inst, 'firstDay');


var firstDay = parseInt(this._get(inst, 'firstDay'));

Reason is:

("3" + 1) % 7 = ("31" % 6) = wrong answer

Operator overloading is nice... sometimes.

comment:2 Changed 14 years ago by kbwood

Resolution: fixed
Status: newclosed


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

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.