For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 12 replies, 5 voices, and was last updated 13 years, 5 months ago by
support-octavio.
-
AuthorPosts
-
SonamGyatoMemberwhat’s the status of custom date picker widgets and
custom alert dialogs (e.g. alert, prompt, confirm).the default browser dialogs look pretty bad.
what’s the issue?
January 7, 2013 at 1:43 pm #333879
support-michaelKeymaster> what’s the status of custom date picker widgets and custom alert dialogs (e.g. alert, prompt, confirm).
Date picker is soon to be well implemented in iOS and android as HTML <input type=”date”… We have been experimenting with the different date/time selection modes and they look great. Load the following webpage on your iOS5 or 6 or Android 4.1 device and try out the level of date/time support http://www.quirksmode.org/html5/tests/inputs_dates.html
You can incorporate either manually include such input using the HTML widget or modify the html src of an <input> (assuming you are completed with the UI design to avoid overwriting your manual edits.
For native apps there is phoneui.alert() and phoneui.confirm() which are smart wrappers for the Cordova/PhoneGap dialogs;
/** * shows alert and calls fnContinue then. Note: works in different * ways in iOS and TC. For TC it returns immediately, while for iOS * it returns only when user pressed OK * * @param message Text message * @param fnContinue function that called when user selected button. * @param optionalTitle optional, title for dialog * @param optionalButtonLabel optional, button label */ phoneui.alert = function(message, fnContinue, optionalTitle, optionalButtonLabel) { /** * shows confirmation dialog. result comes to fnContinue. Blocks in web app, doesn't block in * phonegap apps * * @param message Text message * @param fnContinue function that called when user selected button. Takes 1-based index of selected button * @param optionalTitle optional, title for dialog * @param optionalButtonLabel optional, string with comma-separated button labels */ phoneui.confirm = function(message, fnContinue, optionalTitle, optionalButtonLabel) {January 8, 2013 at 9:28 am #333904
SonamGyatoMemberjust did this
document.getElementById(“m1-settings-date”).setAttribute( “type”, “date” );
and no effect…still accepts letters.
this is using the emulator iPhone 4 and iOS 5
January 8, 2013 at 9:37 am #333907
support-michaelKeymasterThe Test Center does not provide support for the input date or number types. You’ll have to test them on your device to see in action.
January 8, 2013 at 3:28 pm #333919
SonamGyatoMemberi hope the INPUT type DATE is available in the next release.
February 13, 2013 at 6:56 am #335359
JohnJake2MemberHi support-wayne.
I seached the forum quite a while and according to API functions for alert, confirm and prompt this post seems to be the latest one.
Can you confirm that something like navigator.notification.prompt is not ready to use at the moment? I am looking forward to that to avoid the http://www.pagexy.html title in the alert or the prompt box.
Thx in advance for your information update on this topic.
JohnJake.February 18, 2013 at 6:17 pm #335584
support-octavioMemberHi JohnJake,
You can use phoneui.alert() and phoneui.confirm(). In a native app this api binds to the cordova notification.prompt().
February 20, 2013 at 1:01 am #335647
JohnJake2MemberHi support-octavio.
Yes, right. But what I would need is something like phoneui.prompt. Since this does not seem to exist, I am forced to use prompt, which leads to this long and confusing URL-title…
Any ideas?Thx,
JohnJake2February 20, 2013 at 5:08 pm #335704
support-octavioMemberJohn,
You mention that the phoneui.alert() does not work for you. I assume this because you are developing a webapp, right? If not then you can surely use this api to create a nice alert without the file info being presented.
February 21, 2013 at 3:18 am #335715
JohnJake2MemberHi support-octavio.
Yes, it’s a web app.
But No: It’s not about the phoneui.alert() function. My concern was the prompt function in order to get input from the user.Thx,
JohnJake2February 21, 2013 at 3:27 am #335716
support-michaelKeymaster> My concern was the prompt function in order to get input from the user.
Thx for the clarification. I missed that part earlier. MobiOne and Cordova donot provide a custom prompt dialog. Let me chat w/ team if there is something I’m missing.
February 21, 2013 at 11:42 am #335728
Max87MemberHi Wayne,
if I want to use phoneui.alert function with custom title, is this syntax correct?phoneui.alert("Custom message", "Custom title");Thanks
edit: Got it 🙂
Syntax is:phoneui.alert("Custom message", callbackFunction,"Custom title");February 21, 2013 at 12:25 pm #335732
support-octavioMember@Max,
Yes, that should work in a native app
-
AuthorPosts
