Modify

Opened 10 years ago

Closed 8 years ago

#1726 closed defect (fixed)

Change first day of the week in calendar

Reported by: Remy Blank Owned by: Noah Kantrowitz
Priority: normal Component: DateFieldPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

I'm in Switzerland and, well, we like our weeks to start on Monday :-)

Here's a patch that adds an option to trac.ini to select the day to be displayed as the first day of the week:

[datefield]
; 0=Sunday .. 6=Saturday
first_day_of_week = 1

Attachments (3)

first_day_of_week.patch (1.9 KB) - added by Remy Blank 10 years ago.
Adds an option 'first_day_of_week' for trac.ini
first_day_=_1.jpg (22.9 KB) - added by hju@… 8 years ago.
First_day = 1
first_day_=_2.jpg (18.5 KB) - added by hju@… 8 years ago.
First_day = 2

Download all attachments as: .zip

Change History (8)

Changed 10 years ago by Remy Blank

Attachment: first_day_of_week.patch added

Adds an option 'first_day_of_week' for trac.ini

comment:1 Changed 9 years ago by Robert Corsaro

Resolution: fixed
Status: newclosed

Added first_day option to 0.11 branch. There seems to be a bug in jquery-ui datepicker that causes the tue column to be highlighted as a weekend when the firstDay parameter is used. Hopefully it will get fixed in jquery-ui.

comment:2 Changed 8 years ago by hju@…

Resolution: fixed
Status: closedreopened
Trac Release: 0.100.11
Type: enhancementdefect

There seems to be a bug in jquery-ui datepicker that causes the tue column to be highlighted as a weekend when the firstDay parameter is used. Hopefully it will get fixed in jquery-ui.

It is not only a question of higlighting the tue column. The Column-Headers are even disordered. (see attached screenshots)

Changed 8 years ago by hju@…

Attachment: first_day_=_1.jpg added

First_day = 1

Changed 8 years ago by hju@…

Attachment: first_day_=_2.jpg added

First_day = 2

comment:3 Changed 8 years ago by petrus69@…

Same over here, weekday/-end highlighting as well as the disordered day of week short names appear in any first_day=X setting different from first_day=0.

comment:4 Changed 8 years ago by peterson_eric_d@…

I also like my calendars to start on Monday. But when I set first_day = 1, the calendar is slightly messed up.

My weekdays are called

MoThSuWeSaTuFri

with Su and Tu highlighted as weekends. The numbers in the calendar are correct, just the week day names and weekend highlights are messed up.

comment:5 Changed 8 years ago by anonymous

Resolution: fixed
Status: reopenedclosed

Modify Ticket

Action
as closed The owner will remain Noah Kantrowitz.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.