【问题标题】:jQuery Mobile Date & Time Input Not WorkingjQuery Mobile 日期和时间输入不起作用
【发布时间】:2013-09-06 03:07:17
【问题描述】:

jquery mobile 提供了自己的日期和时间输入方式,即

<input type = "date" />
<input type = "time" />

这在浏览器和某些手机 (android) 上运行良好。它使用滑动条调出本机菜单以选择时间和日期。但是,在 Android 平板电脑上,它不起作用,输入只是用作任何常规文本输入。

我之前尝试过使用 datepicker 插件,但是速度很慢...

有什么办法可以解决这个问题吗?或者有什么有用的、简单的插件可以用吗?

谢谢!

【问题讨论】:

    标签: jquery date mobile time


    【解决方案1】:
    <script>
      //reset type=date inputs to text
      $( document ).bind( "mobileinit", function(){
        $.mobile.page.prototype.options.degradeInputs.date = true;
      });   
    </script>
    

    【讨论】:

    • 在您的评论中您说这会将日期输入重置为文本?我不希望它...
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多