oncall
oncall copied to clipboard
First day of the week
Hi,
Is it possible to modify Calendar body to replicate changes done to ui/static/js/incalendar.js (daysLong, short_days, firstDay)? Header line changes, but cells are not aligned as they should be.
I've added my tz(Europe/Athens) to the moment.js but nothing changed.
Hello,
I was able to identify objects myself. If anyone ever stumbles upon this question again, sharing my changes..
static/js/oncall.js
// var daysShort = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],
var daysShort = ['Mon','Tue','Wed','Thu','Fri','Sat','Sun'],
static/js/incalendar.js
defaults = {
// <...>
// days: ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],
// daysShort: ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],
days: ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'],
daysShort: ['Mon','Tue','Wed','Thu','Fri','Sat','Sun'],
// <...>
// firstDay: 0,
firstDay: 1,
}
// <...>
_buildCalendar:
// <...>
// day = 1,
day = 2
// <...>
getWeekRange: function (date) {
// <...>
// startDate = date.clone().startOf('isoWeek'),
// endDate = date.clone().endOf('isoWeek');
startDate = date.clone().startOf('isoWeek'),
endDate = date.clone().endOf('isoWeek');
<...>
Can someone please re-open this issue and make it somehow configurable? @cEdmundas perhaps? This is really painful. It also seems to skip the first of each month entirely, at least in the dashboard and only partially.
That day = 2 seems wrong to me.
Yeah, so day = 2 skips each first of the month of the current month. the next one is shown until you actually switch to it. Changing it back to "1" is also wrong, because it somehow shifts the days internally wrong then. Kinda frustrating :(