Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.

Change datetime value #7

Open
tiendq opened this issue Oct 8, 2013 · 5 comments
Open

Change datetime value #7

tiendq opened this issue Oct 8, 2013 · 5 comments

Comments

@tiendq
Copy link

tiendq commented Oct 8, 2013

Hi,

How can I change datetime value after the datepicker control is opened?

Thanks,

@sectore
Copy link
Owner

sectore commented Oct 8, 2013

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...

@tiendq
Copy link
Author

tiendq commented Oct 9, 2013

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,

@sectore
Copy link
Owner

sectore commented Oct 11, 2013

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!

@ghost ghost assigned sectore Oct 11, 2013
@tiendq
Copy link
Author

tiendq commented Oct 11, 2013

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.

@sectore
Copy link
Owner

sectore commented Oct 11, 2013

I agree! So I will update the plugin to handle change events.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants