Do I need to make any change to the timeline mode as well?
Re: weekStartDay on timeline (scheduler) mode
Posted: Wed Aug 10, 2022 9:39 pm
by marcio
Hey tdset,
Actually, I tested that configuration in our basic demo and worked just fine, perhaps some other configuration is set in a different way in the timeline?
If that didn't make it, could you please share your configuration here to check what could be causing that?
Re: weekStartDay on timeline (scheduler) mode
Posted: Thu Aug 11, 2022 9:54 am
by tdset
Hi Marcio,
I'm using your "calendar-scheduler" example, and the only line that I added was:
const calendar = new Calendar({
appendTo : 'container',
// the week starts on Monday
weekStartDay: 1,
// Start life looking at this date
date : new Date(2020, 9, 11),
Setting it to Monday works well for Day / Week / Month modes, but not with the "Timeline" mode.
It's not a bug, what controls the initial date of the Scheduler (in a day based view) is the startDate which is set to a Sunday:
date : new Date(2020, 9, 11),
If Scheduler was showing a week-based mode, it would work as you expected.
Re: weekStartDay on timeline (scheduler) mode
Posted: Fri Aug 12, 2022 9:10 am
by tdset
I'm not referring to a day based view, or a week based view. It's the integration of the Scheduler into the Calendar (timeline mode).
If it works correctly, how can we load the timeline, showing (or focusing) the current day, while having the week starting on a Monday?
const calendar = new Calendar({
appendTo: 'container',
// if this date below always has to be a Monday (for the scheduler to work correctly),
// how can we focus on the current day?
date: new Date(2022, 7, 1),
weekStartDay : 1,
If the date above is any day of the week, the scheduler always starts on a Sunday.
I'm not referring to a day based view, or a week based view. It's the integration of the Scheduler into the Calendar (timeline mode).
I meant this in a Scheduler context. The Scheduler has different viewPreset that show days, weeks, months etc. If you use day based view (such in your sample code), the startDate you set will be respected and you should set it to the value you want. If you instead choose a week based viewPreset (such as weekAndDay), it'll be snapped to match the weekStartDate.
I'm using the official integration example, which uses hourAndDay viewPreset.
Re: weekStartDay on timeline (scheduler) mode
Posted: Thu Aug 18, 2022 4:24 pm
by alex.l
I re-tested it with another dataset and looks like it doesn't work. I've reopened a ticket https://github.com/bryntum/support/issues/5057
You could try to change weekStartDay in locale directly (if applicable in your case), it will be working (make sure date config in calendar is not starting before that day, otherwise another week will be shown on the left).