【问题标题】:Time Picker is not showing slider buttons时间选择器未显示滑块按钮
【发布时间】:2013-12-17 23:29:18
【问题描述】:

我已经实现了一个时间选择器。但它没有显示滑块按钮,从那里选择时间。

请看这张图片:

控制台没有错误。

这是我现在使用的代码:

<script type="text/javascript">
$(function () {
    $("#timeField").datetimepicker(
    {
    minDate: 0,
    timeFormat: "hh:mm TT"
    }
    );
});
</script>

这是我正在使用的插件:

    <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
    <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
    <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
    <link href="http://trentrichardson.com/examples/timepicker/jquery-ui-timepicker-addon.css" rel="stylesheet" type="text/css">
    <script src="http://trentrichardson.com/examples/timepicker/jquery-ui-timepicker-addon.js" type="text/javascript">
    <script src="http://trentrichardson.com/examples/timepicker/jquery-ui-sliderAccess.js" type="text/javascript">

可能是什么问题?

【问题讨论】:

  • 您需要像这样包含 ..只需下载此插件并附加到您的代码中
  • @tamilmani 我已经包含了它。看看最后一个插件
  • @Hassan Sardar:你找到解决方案了吗?
  • @HassanSardar 你解决了吗?我目前有同样的问题。请发布您的解决方案作为答案(如果找到)。

标签: javascript jquery css jquery-ui datetimepicker


【解决方案1】:

请参考此链接:

example datetimepicker

$('#basic').datetimepicker({
        timeFormat: "hh:mm tt",

        hourMin: 8,

        hourMax: 16,

        numberOfMonths: 2,

        minDate: 0,

        maxDate: 30
});

【讨论】:

    【解决方案2】:

    尝试将滑块脚本包含在时间选择器脚本上方。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-07-28
      • 1970-01-01
      • 1970-01-01
      • 2018-04-03
      • 1970-01-01
      • 2020-05-04
      • 2012-12-28
      相关资源
      最近更新 更多