XF 1.4 I'd like Monday to be the first of week

Lile

New member
In the calendar popup (e.g. search), Sunday is the default first day of week.

In some countries it is considered to be Monday.

How can I change this?

Thank you!
 
I have had users complaining about picking the wrong date, because they thought Sunday was Monday. It would be nice to have a datepicker with the "right" first day of the week.
 
And the sabbath was originally on Saturday :p
True, but for a long time now Sunday has traditionally been the day of rest after 6 days of work. That makes it the end of the week and Monday the first day. :)

Anyway, there should be an option to choose Sunday or Monday as the first day in the calendar.
 
True, but for a long time now Sunday has traditionally been the day of rest after 6 days of work. That makes it the end of the week and Monday the first day. :)

Anyway, there should be an option to choose Sunday or Monday as the first day in the calendar.

I completely agree that Monday is the start of the week but the whole "day of rest" reasoning is flawed.
 
By convention, Monday is the first day of the week. Anyone that says otherwise is just silly...

Weekend = Saturday & Sunday = No School/College
Workdays = Monday - Friday = School/College

The working week starts on a Monday... It just doesn't make sense any other way.
 
I completely agree that Monday is the start of the week but the whole "day of rest" reasoning is flawed.
I disagree on the flawed argument but really, it doesn't matter which of us is right for or wrong in this. What is important is that there should be an option to choose the first day of the week in the calendar.
 
As Mike says, there's no option for this.

There is, however, a way of achieving this with a small code edit. You would need to reapply this after each XF upgrade.

The file to change is:
js/xenforo/xenforo.js

Open that file and search for:
Code:
lang:"_f",

That only appears once.

Change it to:
Code:
lang:"_f",firstDay:1,

0 is Sunday (default), 1 is Monday, 2 is Tuesday etc... so change it to whatever you like, if you were to change it to 3 for some odd reason:

upload_2014-10-5_17-51-36.webp
 
The working week starts on a Monday... It just doesn't make sense any other way.

Most businesses are open and therefore have working employees every day of the week. To throw a random number, 99 out of 100 businesses are open on Sundays (e.g., Fred Meyer, a grocery store).

It's typically federal businesses that either aren't open on Sundays (post office) or the entire weekend (e.g., the district court), but everything else is open.
 
As Mike says, there's no option for this.

There is, however, a way of achieving this with a small code edit. You would need to reapply this after each XF upgrade.

The file to change is:
js/xenforo/xenforo.js

Open that file and search for:
Code:
lang:"_f",

That only appears once.

Change it to:
Code:
lang:"_f",firstDay:1,

0 is Sunday (default), 1 is Monday, 2 is Tuesday etc... so change it to whatever you like, if you were to change it to 3 for some odd reason:

View attachment 85867

This isn't working anymore for 1.4.7 (previously worked for 1.4.6). I changed the xenforo.sj file after the upgrade to 1.4.7 again of course, as I do it since 1.4.0.
Maybe because of caching? Usually it worked instantaneously but not this time.
 
Nothing has changed so it should work as normal.

It's most likely caching. Usually hard refreshing the page should sort it out. Ctrl + F5.
 
This isn't working anymore for 1.4.7 (previously worked for 1.4.6). I changed the xenforo.sj file after the upgrade to 1.4.7 again of course, as I do it since 1.4.0.
Maybe because of caching? Usually it worked instantaneously but not this time.
Still working for me on 1.4.7.
 
  • Like
Reactions: sbj
Nothing has changed so it should work as normal.

It's most likely caching. Usually hard refreshing the page should sort it out. Ctrl + F5.
Yeah, it should, as it was a minor upgrade. I already tried a hard refresh, but it still doesn't work for me.
Any rebuilds I can do to refresh the date picker?

upload_2015-5-20_23-16-30.webp
 
There is nothing else. If it has worked before, and you've done it the same way, then it should work again (just as it has for other people).
 
Last edited:
As Mike says, there's no option for this.

There is, however, a way of achieving this with a small code edit. You would need to reapply this after each XF upgrade.

The file to change is:
js/xenforo/xenforo.js

Open that file and search for:
Code:
lang:"_f",

That only appears once.

Change it to:
Code:
lang:"_f",firstDay:1,

0 is Sunday (default), 1 is Monday, 2 is Tuesday etc... so change it to whatever you like, if you were to change it to 3 for some odd reason:

View attachment 85867

Is there a way to move the year in front of the month?

I want to go from this:

Before.webp

to this:

After.webp
 
It is that time again, time to upgrade xenforo and time to do this file edit.
Please consider making it an option or just set monday to first day of the week.
 
Top Bottom