techouse/intl-date-time

Ability to add firstDayOfWeek function

tsharp-decimal opened this issue · 2 comments

On the Nova DateTime field there is an ability to change the first day of the week on the calendar.

Is it possible to introduce this functionality to IntlDateTime?

Customizing The First Day of the Week

By default, Nova's Date and DateTime fields recognize Sunday as the first day of the week (as the >United States, Canada, and Japan do). If you wish to customize this to follow the international >standard ISO 8601, you can set the firstDayOfWeek option on the field:

Date::make('Birthday')->firstDayOfWeek(1);
DateTime::make('Created At')->firstDayOfWeek(1);

This should theoretically be possible, however usually you'd rely on the provided Flatpickr locale and Moment locale to set this for you automatically.

v.1.2.5 now features the option to override firstDayOfWeek just like you would in the native Nova Date and/or DateTime field.