react-native-datetimepicker / datetimepicker

React Native date & time picker component for iOS, Android and Windows
MIT License
2.35k stars 381 forks source link

Update Android to Material Design 3 #790

Open Harry-Dang opened 9 months ago

Harry-Dang commented 9 months ago

Feature request

Update the date time picker from Material Design 2 to Material Design 3

With the release of Android 12 in 2021, Android's native design language has updated from Material Design 2 to Material Design 3. This change brought a complete redesign to Android including the native date picker. By updating to MD3, the date picker would be aligned with other modern native Android components

As an aside, it would be nice to include support for Material You which would add style support as requested in #572

Why it is needed

Modern Android follows Google's new Material Design 3 design language. To keep this library in line with modern Android, the date picker needs to be updated

Possible implementation

I'm not too familiar with Android development anymore, but I believe you would need to replace the current use of android.widget.DatePicker with com.google.android.material.datepicker (similar for the TimePicker)

vonovak commented 9 months ago

Hello and thanks for asking, yes, it indeed would be nice to have those, as I mentioned in https://github.com/react-native-datetimepicker/datetimepicker/issues/313#issuecomment-1561924293. It'd also allow to bring many new features such as disabling dates (https://github.com/react-native-datetimepicker/datetimepicker/issues/815).

However "you would need to replace the current use of android.widget.DatePicker with com.google.android.material.datepicker (similar for the TimePicker)" is a pretty big chunk of work.

PRs that would do this work are welcome. I maintain this library from open collective sponsorships, but there are not enough of them for me to work on major updates like this one. It's as simple as that 🤷

Thank you 🙂

camilossantos2809 commented 2 months ago

This feature would be very interesting, is there any work being done on this already? Which files would need to be migrated, just the RNDatePickerDialogFragment? Would the idea be to replace it or create another component?