bootstrap移动设备键盘显示

时间:2016-11-28 15:09:08

标签: jquery twitter-bootstrap

我正在使用带有bootstrap datepicker的Higchart图。我有一个日期的texbox。当我单击tectbox选择日期时,键盘将打开并显示我之前选择的某些日期。我的脚本在这里:

<script type="text/javascript">

        $(document).ready(function () {

            $('#date').datepicker({ //# ile id üzerinden yaparsanız yanlızca bir input çalışır 
                format: "yyyy-mm-dd", //dd-mm-yyyy
            autoclose: true,
            weekStart: 1,
            "disableTouchKeyboard": true
            }).load('show', function () {
        var today = new Date();
        var curr_date = today.getDate();
        var curr_month = today.getMonth()+1;
        var curr_year = today.getFullYear();
        var currentDate = curr_year + "-" + curr_month + "-" + curr_date;
        $(this).val(currentDate);
      });
       });

</script>

我哪里做错了?

2 个答案:

答案 0 :(得分:0)

不确定,但这可能会有所帮助

$.post("operacions/obtenirIdUs.php", {idUsConcret : idUsConcret}, null, "json").then(
 function(data){
   //handle your data
},function(err){
   //handle error
});

答案 1 :(得分:0)

也可以在datepicker中添加readonly属性。

 $(".datepicker").datepicker({
    format: "dd-M-yyyy",
    autoclose: true,
    disableTouchKeyboard: true,
    Readonly: true
}).attr("readonly", "readonly");