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

Able to edit time in TextInput to non intervals when the minuteInterval is set. #806

Open
svmx-sandeep-balaji opened this issue Aug 31, 2023 · 0 comments

Comments

@svmx-sandeep-balaji
Copy link

Feature request

Hi Team, I've been using minuteInterval set to 15mins in DateTimePicker. But the requirement here is to show the timer picker with 15-minute intervals in the spinner and the user should be able to edit non-15-minute intervals while using the keyboard.
We can achieve this feature on iOS datetimepicker just by making the roundsToMinuteInterval param false.
ref: https://developer.apple.com/documentation/uikit/uidatepicker/3791478-roundstominuteinterval?language=objc

Why it is needed

So after adding minuteInterval={15}, we were able to see the time picker with 15-minute intervals in the spinner but the problem was when we used the keyboard the time would round to the closest 15min closest. The change we want is to prevent the time picker from going back to the closest 15mins interval while using the keyboard I mean when the picker is in TextInputMode the user can enter 15-minute intervals while using the keyboard.

Possible implementation

Adding an extra parameter roundsToMinuteInterva which takes bool as a param.

sample

Screen.Recording.2023-08-31.at.10.58.05.AM.mov
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

1 participant