Primeng: Globally configure p-calendar firstDayOfWeek

Created on 10 Dec 2020  路  3Comments  路  Source: primefaces/primeng

[ ] bug report => Search github for a similar issue or PR before submitting
[X ] feature request => Please check if request is not on the roadmap already

Currently I have to set the firstDayOfWeek in every instance of p-calendar (>100 instances), ideally, I鈥檇 like to be able to set it once either in PrimeNGConfig or the new Translation setting in PrimeNGConfig.

I'm Currently using PrimeNG version: 11.0.0

enhancement

Most helpful comment

Was happy to set calendars' config once for our whole app with i18n API, but as we're reaching France here, had to add firstDayOfWeek on our >100 instances too - which I could set once before PrimeNg V10.
I definitely think firstDayOfWeek has its place in PrimeNGConfig

All 3 comments

Right, and this is a breaking change from v10 not mentioned in the migration guide!

Previously the firstDayOfWeek was part of locale, now it's separate. Why? What was the reasoning to separate it?

At least the default should be taken from locale. And then the option to overrride it if you feel that such option is needed.

Indeed, you're introducing breaking changes where there is no need for them. This applies to the calendar locale change too. You could have easily left the locale option and just add the default coming from config translations...

Was happy to set calendars' config once for our whole app with i18n API, but as we're reaching France here, had to add firstDayOfWeek on our >100 instances too - which I could set once before PrimeNg V10.
I definitely think firstDayOfWeek has its place in PrimeNGConfig

There is no way to set firstDayOfWeek for a p-columnFilter if its type is date. So its is cruicial to have it in PrimeNGConfig

Was this page helpful?
0 / 5 - 0 ratings