I've been using PhoneGap for a while mainly focused at iOS and using mostly 100% web code.
I'm about to investigate PhoneGap for another project where there is a desire to leverage the device's native form input components.
An example is the date picker. The spinners in iOS, the 'clicker' in Android, etc.
To what extent does/can PhoneGap access native UI components like that? If I'm targetting iOS4, can I call the native device date picker from my HTML/JS?
(I should add that I know this is not the preferred model...the entire point of PhoneGap is to be able to manage less code across more devices and standardizing on a shared UI is the better bet...but I'm investigating the options requested...)
Yes you can invoke a native datepicker using phonegap plugins. There are currently two implementations for Android and for iOS:
Android: https://github.com/phonegap/phonegap-plugins/tree/master/Android/DatePicker iOS: https://github.com/phonegap/phonegap-plugins/tree/master/iPhone/DatePicker
No, you cannot invoke native date picker using phonegap. Phonegap is a wrapper around your browser container on mobile device. The Phonegap API has documentation related to what level of device api access is possible (Camera, Location etc)
As pointed in another answer , you can look at mobilescroll (opensource HTML/JS date-picker) http://code.google.com/p/mobiscroll/
Invoke native date picker from web-app on iOS/Android
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With