oncall icon indicating copy to clipboard operation
oncall copied to clipboard

First day of the week

Open cEdmundas opened this issue 6 years ago • 3 comments

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.

cEdmundas avatar Oct 10 '19 15:10 cEdmundas

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');
<...>

cEdmundas avatar Oct 11 '19 06:10 cEdmundas

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.

idl0r avatar Jan 04 '24 13:01 idl0r

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 :(

idl0r avatar Jan 04 '24 13:01 idl0r