Topic on Extension talk:MsCalendar

First day of the week

5
Summary by Sophivorus

To set Sunday as the first day of the week, change line 47 of the file jquery.calendario.js in the js directory. Instead of:

startIn : 1

Write:

startIn: 0

Then remember to refresh the calendar page to reload the JavaScript.

Setting this from LocalSettings.php is currently not possible.

This feature request is tracked at phab:T241729, please comment there.

109.226.22.11 (talkcontribs)

Is there an option to change the first day of the week e.g. monday to sunday? and is there other attributes to use with this calendar?

SmartK (talkcontribs)

This would be cool, but there is no option yet. Maybe you can code that?

Roips (talkcontribs)

Yes, just change the file jquery.calendario.js inside the js folder.

At line 47:

Instead of

startIn : 1

Write

startIn: 0

P.S.: Click Ctrl+F5 in the browser in order to reload the updated JavaScript

Kanto501 (talkcontribs)

The change of line 47 from startln: 1 to startln: 0 works but... the shading does not move for the days of the week now instead of saturday and sunday shaded it has friday and saturday shaded. How to change the shading to be saturday and sunday once changing the start of the week to sunday?

Kanto501 (talkcontribs)

ok, figured it out:

in the jquery.calendario.js file:


line 47 change startIn: 1, to startIn: 0, //this changes the start day to Sunday

line 263 change if( j <= 6 && j >= 5) //weekend to if( j == 0 || j == 6) //weekend //this will move the shading for the weekend days to be Sunday and Saturday. If you don't make this change the shading for weekend will be Friday and Saturday.

Reply to "First day of the week"