Topic on Talk:OOUI

Setting the first day of the week in the calendar input

3
Yaron Koren (talkcontribs)

Hi - for the OOUI DateInputWidget (currently used in UploadWizard and maybe elsewhere), is there a way to change the first day of the week shown in the calendar input from Sunday to other days (since in many countries it's Monday or even Saturday)?

Matma Rex (talkcontribs)

The start of week shown in the calendar depends on user language, e.g. it's Monday in Polish and Sunday in English. https://phabricator.wikimedia.org/source/mediawiki/browse/master/resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js$186

The logic for this comes from the Moment.js library. It allows you to customize this: https://momentjs.com/docs/#/customization/dow-doy/ but I'm not sure what's a good way to do that without hacking up MediaWiki's files.

Also, if it's an acceptable option for you, apparently the en-gb locale is also using Monday as the first day of the week.

Yaron Koren (talkcontribs)

@Matma Rex - okay, thank you, that's good to know - both in general and about the en-gb "hack".

Reply to "Setting the first day of the week in the calendar input"