uxsolutions / bootstrap-datepicker

A datepicker for twitter bootstrap (@twbs)
Apache License 2.0
12.66k stars 6.07k forks source link

Hide keyboard on mobiles (iphone etc) when datepicker is in bootstrap modal dialog #1796

Open laxman4434 opened 8 years ago

laxman4434 commented 8 years ago

Hi,

I am using datepicker version 1.5.1 and my textbox is in bootstrap modal dialog.

For some reason even when i am using disableTouchKeyboard :true, I am able to see keyboard on mobiles.

My jquery is as follows:

        $('#overseas_datepicker').datepicker({
            format: 'dd/mm/yyyy',
            autoclose: true,
            clearBtn: true,
            startDate: new Date(),
            endDate: '+60d',
            disableTouchKeyboard: true,
            forceParse: true,
            todayHighlight: true
        });

Any help would be appreciated.

echan00 commented 7 years ago

Add 'readonly' at the end of your input tag like this

<input class="" style="" readonly>