Search code examples
jqueryjquery-mobiledatepickerandroid-datepicker

JQueryMobile DatePicker, how to show datepicker on textbox onfocus


What am I trying to do?

Have the jqueryMobile datepicker (flip style) show the datepicker when the user clicks on the date textbox, but I cant seam to behaving the way I like.

The simple flip style date picker can be found here http://dev.jtsage.com/jQM-DateBox/demos/flip/

The behavior I am aiming for is like the one that is located here http://mobipick.sustainablepace.net/demo.html

What I need help with?

Creating the jquery code, to make the first link's date picker (JQueryMobile), behave as the second one. (mobipick)


Solution

  • You could set noButtonFocusMode to true in options

    <input name="mydate" id="mydate" type="date" data-role="datebox"
       data-options='{"mode": "flipbox","noButtonFocusMode": true}'>