Page 1 of 1

Datepicker - first day of week

Posted: 2021-01-26 13:04
by eagle
I use the datepicker referenced by .toDatepicker()

Is it possible to set monday as first day of week in the date picker?

Thanks for all help!

Re: Datepicker - first day of week

Posted: 2021-01-26 13:41
by jsetzer
The function is using the default datetimepicker shipped with AppGini. All localization settings you can do with AppGini itself should be reflected.

Re: Datepicker - first day of week

Posted: 2021-01-26 14:16
by eagle
Ok. Thanks for your quick reply.

Re: Datepicker - first day of week

Posted: 2021-01-26 16:07
by jsetzer
Just another idea: Open language.php and search for...

Code: Select all

$Translation['datetimepicker locale']
The value should match with your two-character country-code.

In my (German) projects it is configured as 'de' ...

Code: Select all

$Translation['datetimepicker locale'] = 'de';
... which automatically results in a German calendar with weeks starting on Monday:

chrome_Q9nLclfCou.png
chrome_Q9nLclfCou.png (10.02 KiB) Viewed 3806 times


If you don't have your country-dependent language.php file, follow the instructions here: https://bigprof.com/appgini/download-language-files.

I guess not all languages have been translated 100% percent. If that line does not exists in your specific language file, just append the line and save it into files subdirectory of your AppGini-Programfiles directory.

For example, mine is:
C:\Program Files (x86)\AppGini_5.94\files\language.php

Re: Datepicker - first day of week

Posted: 2021-01-27 12:18
by eagle
Great, that solved it completely.

Code: Select all

$Translation['datetimepicker locale'] = 'nb';
resulted in a Norwegian datepicker with monday as start of week.

Thanks!

Eagle

Re: Datepicker - first day of week

Posted: 2021-01-27 12:19
by jsetzer
You are welcome! Good to know that this locale option still works in latest AG 5.9x