[MaterialDatePicker] Option to set the start day of the week
Is your feature request related to a problem? Please describe. In my app, I allow users to select the initial day of the week (Saturday, Sunday or Monday). I observed that MaterialDatePicker (version 1.3.0-beta01) sets the start of the week depending on the locale, but that may not always be the case for my users.
Describe the solution you'd like An option to set the initial day of the week when building the picker.
Describe alternatives you've considered Currently, I need to use an external library to achieve this.
Note I just want to congratulate the whole team for the awesome work you're doing with this library. Your work is really appreciated.
@jmartingit Could you describe which external library helps you achieve this requirement?
This is the library I'm using: https://github.com/wdullaer/MaterialDateTimePicker
Would love to this feature as well. Something similar to the DatePickerDialog:
val picker = DatePickerDialog(requireContext())
picker.datePicker.firstDayOfWeek = Calendar.MONDAY
...
Since 1.7.0 there's a hidden setFirstDayOfWeek function in the CalendarConstraints.Builder, see:
https://github.com/material-components/material-components-android/blob/release-1.7/lib/java/com/google/android/material/datepicker/CalendarConstraints.java#L337
Dunno why it's still kept hidden when support for first week of day has been implemented since the initial release, see: https://github.com/material-components/material-components-android/blob/release-1.1/lib/java/com/google/android/material/datepicker/DaysOfWeekAdapter.java
Please make it official.