react-native-datetimepicker / datetimepicker

React Native date & time picker component for iOS, Android and Windows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[iOS] Add buttons done and cancel with props onConfirm and onCancel

harsh25jai opened this issue · comments

Feature request

The issue with any mode date picker, as soon as you click or change year, month or day. The date gets setted, for example if today's date is 1st feb 2024, I want to pick date 15th Nov 1992, I start with changing year as soon as I change year the date which gets setted is 1st feb 1992, then again I have to open the picker select appropriate month then again same for day as well. This is not a good user experience to select a date.

Let's try adding onConfirm(optional) prop which will be executed when done button is pressed, whatever year, month and day are selected by it gets setted, and if onConfirm prop is present the picker should not get hidden or have setted the date, user can switch between years, months and dates as they want.

The issue is iOS only

Hello and thanks for asking,
you need to create cancel and confirm buttons by yourself, this library does not and will not offer that functionality.
Thank you 🙂