facebook

date picker widgets and custom alert dialogs

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #333874 Reply

    SonamGyato
    Member

    what’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?

    #333879

    support-michael
    Keymaster

    @everest

    > 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) {
    #333904

    SonamGyato
    Member

    just 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

    #333907

    support-michael
    Keymaster

    @everest

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

    #333919

    SonamGyato
    Member

    i hope the INPUT type DATE is available in the next release.

    #335359

    JohnJake2
    Member

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

    #335584

    Hi JohnJake,

    You can use phoneui.alert() and phoneui.confirm(). In a native app this api binds to the cordova notification.prompt().

    #335647

    JohnJake2
    Member

    Hi 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,
    JohnJake2

    #335704

    John,

    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.

    #335715

    JohnJake2
    Member

    Hi 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,
    JohnJake2

    #335716

    support-michael
    Keymaster

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

    #335728

    Max87
    Member

    Hi 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");
    #335732

    @Max,

    Yes, that should work in a native app

Viewing 13 posts - 1 through 13 (of 13 total)
Reply To: date picker widgets and custom alert dialogs

You must be logged in to post in the forum log in