Change datetime value
Hi,
How can I change datetime value after the datepicker control is opened?
Thanks,
Only an user interaction can change the value of the date picker control (UIDatePicker) if it is opened. But I'm not sure if I understood you correctly...
Yes, sadly that it can't be done, thanks.
BTW, you have rewritten this plugin but also removed several things e.g. change event, could you add them back? you know, change event is useful to update input field timely to reflect what user has chosen on the datepicker.
Thanks,
Could you show me the line of code or documentation of the "original" plugin, where the change event is fired, please? Unfortunately I could not find it.
The "new" plugin displays on an iPhone a cancel and a done button to cancel or save the changes of the selected date by an user activity. Therefore it seems not a good idea to show any changes of the date twice (DatePicker and input field) before an user confirms its changes by pressing the done button. Because the date picker is acting as a layer on top of the application.
Another case on the iPad: Because there are not a cancel and done button any changes of the date will be displayed immediately calling the _dateSelected method on JS side.
Please let me know what you think about it. Thanks!
It was not "original" plugin, I'm sorry to make you confused. I was talking about other iOS datepicker plugin, it's here and you can easily see onchange event: https://github.com/radhar/phonegap-ios-datepicker-plugin
IMHO, I think that plugin is more flexible since it allows us to show/hide accessory bar and handle change event. You know, we can often select date and dismiss datepicker by tapping on a field on a view, not by tapping datepicker's cancel/done button.
I agree! So I will update the plugin to handle change events.