Hello,

I use bootstrap datepicker and can I make it so that the keyboard does not open in the date fields when I click on this field? I found this https://github.com/Eonasdan/bootstrap-datetimepicker/issues/494 link

I downloaded the file bootstrap-datepicker.js - it is three times larger than the file that I used and has a header

But did the choice of the date stop working at all?

I have :

Bootstrap 3 is enabled. Version: 3.3.6. jquery version: 1.11.1 jquery ui version: 1.11.1

Picker works for you this date and if so with which versions of Bootstrap / jquery? Could anyone solve the problem of opening the keyboard in the input of the smartphone?

Спасибо! 

    2 answers 2

    With date fields js libraries work in two ways:

    • Leave the date field in the html5-date field. Such a field on the mobile phone will open a special “keyboard” to select the date (year / month / number with three reels);
    • Change the field type to html5-text and attach a non-standard calendar output to its focus. Such a field on the mobile phone along with the calendar will inevitably open the standard phone keypad.

    For 3 years in web development, I checked about 10-20 different datapicks and calendars, and stopped at pickadate.js . I recommend you go to it.

    Pickadate works on the second principle - it shows a non-standard calendar when you click on the field. But unlike other libraries, it prevents the opening of a standard keyboard on a mobile device. As a result, on the phone the result will be as follows:

    enter image description here

      Thank you, interesting lib and the question arose: I ask with different display formats and submissions

      $ ('# filter_created_at_from'). pickadate ({formatSubmit: 'yyyy-mm-dd', format: 'd mmmm, yyyy', hiddenName: false}) // http://amsul.ca/pickadate.js/date / $ ('# filter_created_at_till'). pickadate ({formatSubmit: 'yyyy-mm-dd', format: 'd mmmm, yyyy', hiddenName: false})

      But I am not submitting the form, but transmitting via ajax and reading the field values

       $("#filter_created_at_till").val() 

      I get the value in the form 27 August, 2016 And how to get the value in the submission format?