Date picker language and Monday as first day of Week

Anvil’s datepicker uses a javascript package called moment to handle the dates

To make the first day of the week Monday you can do the following:

from anvil.js.window import moment

moment.updateLocale("en", { "week": {
  "dow": 1, # First day of week is Monday
}})

I can’t guarantee that this will always be the case, so you might want to wrap this in a try except block.

Re changing the to local language this post may be helpful:

But, moment needs to know the target language and have access to the locale file for that target language.

You also might find this custom component helpful since it uses the native browser datetime input, which will likely be localized: