To reproduce the issue, you need to have safari (on current iOS/macOS)
on a localization with DST at midnight that goes from 00:00 to 23:00
when an hour is removed (Chile, Cuba, Iran, Jordan, Lebanon, Palestine,
Paraguay and Syria).
In these localization, depending on some heuristic the month view could
have duplicated days or not work at all for a given month.
eg. with Lebanon localization, showing "April 2020" month view will
throw an error "TypeError: undefined is not an object (evaluating
'row.append')" because with the current code:
this._viewDate.clone().startOf('M').startOf('w').startOf('d');
// .startOf('M') => Apr 01 00:00:00
// .startOf('w') => Mar 28 23:00:00 #(in other browsers Mar 29 00:00:00)
// .startOf('d') => Mar 28 00:00:00 #(in other browsers Mar 29 00:00:00)
=> we do not start with a first day of the week so doing:
To reproduce the issue, you need to have safari (on current iOS/macOS) on a localization with DST at midnight that goes from 00:00 to 23:00 when an hour is removed (Chile, Cuba, Iran, Jordan, Lebanon, Palestine, Paraguay and Syria).
In these localization, depending on some heuristic the month view could have duplicated days or not work at all for a given month.
eg. with Lebanon localization, showing "April 2020" month view will throw an error "TypeError: undefined is not an object (evaluating 'row.append')" because with the current code:
=> we do not start with a first day of the week so doing:
https://github.com/tempusdominus/bootstrap-4/blob/bb8cd3cc4924d560f6e52155fa4229156f51337b/src/js/tempusdominus-bootstrap-4.js#L522
causes an error (because row is
undefined
since we are not oncurrentDate.weekday() === 0
) that makes the month of April unusable.with the same setup, showing "March 2020", the month view works but there is two "28" days:
Other reports of the issue itself:
https://github.com/date-fns/date-fns/issues/571
Reports of the issue in bootstrap-datetimepicker: