fix: 🐛 Week starts on monday regardless of selected locale (#642)
* fix: 🐛 Week starts on monday regardless of selected locale * style: 💄 lint
This commit is contained in:
parent
7d8662ff09
commit
7e8ee956f4
|
@ -107,7 +107,13 @@ export const Day = ({ weekDay, lunch, lessons }: DayProps) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Week = ({ child }: WeekProps) => {
|
export const Week = ({ child }: WeekProps) => {
|
||||||
moment.locale(LanguageService.getLocale())
|
const locale = LanguageService.getLocale()
|
||||||
|
moment.updateLocale(locale, {
|
||||||
|
week: {
|
||||||
|
dow: 1, // Monday is the first day of the week.
|
||||||
|
},
|
||||||
|
})
|
||||||
|
moment.locale(locale)
|
||||||
const days = moment.weekdaysShort().slice(1, 6)
|
const days = moment.weekdaysShort().slice(1, 6)
|
||||||
const displayDate = getMeaningfulStartingDate(moment())
|
const displayDate = getMeaningfulStartingDate(moment())
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue