-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
DatePicker's cancel and ok button click handler #2879
Comments
What's your issue? |
@Prometheuser would like to use the cancel button in the dialog to clear the DatePicker. This issue duplicates #1529. |
@nathanmarks Why is this closed? This is not a duplicate to the referenced issue. |
yes why it's closed? We are getting same problem. Please suggest How we fix it? |
Any update or plan on this issue ? I would like to know whether the user has clicked "Cancel" or "OK". That would be quite helpful if we had listeners on action buttons of date/time pickers. Edit: Edit 2: TimePicker is added as: <TimePicker id="timePicker" onDismiss={() => {console.log("Cancel is clicked")}} ref={this.setTimePickerInput} minutesStep={5}/> setTimePickerInput = (input) => {
input.handleAcceptDialog = (time) => console.log("OK is clicked", time)
this.timePickerInput = input
} DatePicker would be: <DatePicker id="datePicker" onDismiss={() => {console.log("Cancel is clicked")}} ref={this.setDatePickerInput}/> setDatePickerInput = (input) => {
input.handleAccept = (date) => console.log("OK is clicked", date)
this.datePickerInput = input
} Then I used this.timePickerInput.openDialog(); I would suggest to have |
<MobileDatePicker |
I think we need to listen the event of DatePicker's cancel and ok button.
Just run handler props in _handleCancelTouchTap and _handleOKTouchTap, that is it!
Isn't it simple and distinct? Why we didn't do it.
The text was updated successfully, but these errors were encountered: