Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AM/PM restriction to DateTimePicker #770

Closed
avocadodip opened this issue Jun 13, 2023 · 1 comment
Closed

Add AM/PM restriction to DateTimePicker #770

avocadodip opened this issue Jun 13, 2023 · 1 comment

Comments

@avocadodip
Copy link

avocadodip commented Jun 13, 2023

Feature that allows for restricting the time of day to either AM or PM.

This feature would be particularly useful in scenarios where an app has different behaviors or functionalities based on the time of the day. For example, a restaurant reservation app might only allow bookings for breakfast in the AM and dinner in the PM.

New prop: timeOfDayRestriction accepts 'AM', 'PM', or 'none' (default)

@vonovak
Copy link
Member

vonovak commented Jun 14, 2023

Hello and thanks for asking,
unfortunately, the underlying native components we use here don't support this. We'd need to build new components on top of https://developer.android.com/reference/com/google/android/material/datepicker/MaterialDatePicker to allow this.

That's only possible if there's strong backing (which there's not), see #313

Thank you 🙂

@vonovak vonovak closed this as completed Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants