Hello team, please see an example:
https://bryntum.com/products/schedulerpro/docs/api/Core/helper/DateHelper#function-startOf-static
Just run in console of the docs
oneWeek = [
{ day: 'Monday', date: new Date(2024, 2, 18) },
{ day: 'Tuesday', date: new Date(2024, 2, 19) },
{ day: 'Wednesday', date: new Date(2024, 2, 20) },
{ day: 'Thursday', date: new Date(2024, 2, 21) },
{ day: 'Friday', date: new Date(2024, 2, 22) },
{ day: 'Saturday', date: new Date(2024, 2, 23) },
{ day: 'Sunday', date: new Date(2024, 2, 24) }
]
firstDay = 1
oneWeek.map(item => {
return DateHelper.startOf(item.date, 'week', true, firstDay)
})
I expect start of week for all days above is Monday, the March 18th. But for Sunday it returns the March 25th which is Monday next week.