Search code examples
jquery-mobiledatepickersoft-keyboard

jQuery Mobile Force hide soft keypad on focusing text input field


I have a date field on a PHP website and I'm using jQuery Mobile for mobile site.

While browsing the site on a mobile browser, (eg firefox mobile on android), on clicking on the date text input, the calendar dialog comes up, but the soft keyboard also comes up on my android (Soft keypad comes up whenever one focuses on a input field) Is there a way, I can force hide the soft keyboard ? Is there a generic javascript based trick to force hide the soft keypad (that works on all mobile devices like iphone, android etc ?

I'm using the jQuery Mobile datepicker from here TIA


Solution

  • Just found an answer to my question. (Guess I didn't search with the right keywords earlier :-|)

    Adding a jQuery blur event on focus solves the issue.

    Thanks to this post by Danny C