react-native-paper-dates
react-native-paper-dates copied to clipboard
Allow validRange for Time Picker
Subject really says it all. There doesn't seem to be a way to define a validRange for the Time Picker.
What is your use-case (why you want this feature?)
Sorry, I should've elaborated on that to begin with.
My specific use-case is that I'm creating a form with a "deadline" field. That deadline has to be some point in the future. While I could, of course, employ validations to check this, I would prefer to be able to restrict the time picker from being able to select a time in the past if the date picker is set to "today".
I could also imagine other scenarios such as a time picker that must be within "business hours". On May 8, 2021, 15:42 -0400, Richard Lindhout @.***>, wrote:
What is your use-case (why you want this feature?) — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
@RichardLindhout , just wanted to comment that I would love this feature too!
My use-case is setting an appointment. Obviously, it should be impossible to set an appointment in the past. For now, I am using errors messages to communicate to the user that the start and end times cannot be set in the past. However, it would be awesome to simply restrict the user to a certain time frame, giving them less options to choose from.
PR for this appreciated!
Sorry! I've been swamped with a new job, new home, and new baby. I most likely won't have time to contribute to this until at least Q1'22.
I'd be happy to help review/test in the meantime if someone else can contribute before then. On Nov 13, 2021, 09:01 -0500, Richard Lindhout @.***>, wrote:
PR for this appreciated! — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
Hi, I also was looking for doing something like that (I mean, place only business hours 8-12pm, 1-5pm) but I can't find the way of implementing this.