bootstrap-datetimepicker时间控件

使用layuilaydate时间控件无法很好地嵌入到bootstap布局中(具体参考日期和时间组件文档 - layui.laydate),因此使用bootstrap-datetimepicker, 这里一定要注意导包的顺序。

转载至bootstrap时间控件–时间选择器,具体请看该blog

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>Title</title><link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"><link href="https://cdn.bootcss.com/bootstrap-datetimepicker/4.17.47/css/bootstrap-datetimepicker.min.css" rel="stylesheet"><script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script><script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script><script src="https://cdn.bootcss.com/moment.js/2.22.0/moment-with-locales.js"></script><script src="https://cdn.bootcss.com/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></script>
</head>
<body><div class="row"><div class='col-sm-6'><div class="form-group"><label>选择开始时间:</label><!--指定 date标记--><div class='input-group date' id='datetimepicker1'><input type='text' class="form-control" /><span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span></div></div></div><div class='col-sm-6'><div class="form-group"><label>选择结束时间:</label><!--指定 date标记--><div class='input-group date' id='datetimepicker2'><input type='text' class="form-control" /><span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span></div></div></div><div class='col-sm-6'><div class="form-group"><label>选择结束时间:</label><!--指定 date标记--><div class='input-group date' id='datetimepicker3'><input type='text' class="form-control" /><span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span></div></div></div></div>
</body>
<script>$('#datetimepicker1').datetimepicker({format: 'YYYY-MM-DD',locale: moment.locale('zh-cn'),defaultDate: "1990-1-1"});$(function () {$('#datetimepicker1').datetimepicker({format: 'YYYY-MM-DD',locale: moment.locale('zh-cn')});$('#datetimepicker2').datetimepicker({format: 'HH:mm',locale: moment.locale('zh-cn')});$('#datetimepicker3').datetimepicker({format: 'YYYY-MM-DD HH:mm',locale: moment.locale('zh-tw')});});
</script>
</html>

bootstrap-datetimepicker时间控件相关推荐

  1. datetimepicker 时间控件 1899年问题以及解决方法

    datetimepicker 时间控件 1899年问题以及解决方法 参考文章: (1)datetimepicker 时间控件 1899年问题以及解决方法 (2)https://www.cnblogs. ...

  2. bootstrap日期时间控件

    datetime控件 Bootstrap的日期时间控件,使用非常的简单. 首先,添加日期时间控件的引用 @*datetime控件*@<link href="~/Content/Boot ...

  3. datetimepicker时间控件

    喜欢上datetimepicker源自于对bootstrap的喜欢. 一款简单到爆的时间空间 引入jq 引入bootstrap 引入datetimepicker和bootstrap-datetimep ...

  4. bootstrap 时间控件

    最近使用了bootstrap的UI感觉确实很漂亮,非常值得学习和使用.下面先简单了解下bootstrap的时间控件. 这个时间控件使用起来还是非常的简单,只需要引入基本的css和js就可以了 需要引入 ...

  5. angularjs 整合bootstrap 时间控件

    一.引入js <link href="${basePath}/static/plugin/bootstrap/css/bootstrap-datetimepicker.min.css& ...

  6. C# DateTimePicker:日期时间控件

    日期时间控件(DateTimePicker)在时间控件中的应用最多,主要用于在界面上显示当前的时间. Format 属性提供了 4 个属性值,如下所示. Short:短日期格式,例如2017/3/1: ...

  7. Bootstrap中datetimepicker日期控件1899年问题解决

    @加粗样式TOC Bootstrap中datetimepicker日期控件1899年问题解决 Bootstrap中datetimepicker日期控件1899年问题解决 最近在开发项目的过程中,遇到一 ...

  8. c# winform时间控件dateTimePicker增加清空日期功能

    显示时间控件的复选框,当复选框取消勾选时,显示时间.当复选框取消勾选时,不显示时间 this.dateTimePicker1.CustomFormat = "yyyy-MM-dd" ...

  9. bootstrap-datetimepicker时间控件添加清除按钮

    本文转自:https://blog.csdn.net/gyysmile/article/details/80226993 其实这位大神写的很好了,为什么我还要在写呢,因为我想写点东西了 最近测试部提出 ...

最新文章

  1. 四部门联合印发《常见类型移动互联网应用程序必要个人信息范围规定》
  2. 实际案例演示:一行 Python 代码实现并行
  3. c++ websocket客户端_python测试开发django81.dwebsocket实现websocket
  4. asp.net core 自定义基于 HttpContext 的 Serilog Enricher
  5. 从IT的角度思考BIM(二):模式与框架
  6. java集合for循环_详解Java中list,set,map的遍历与增强for循环
  7. ZOJ3332 Strange Country II java
  8. 中文和英文论文哪个比较容易发表
  9. HDU 5745 La Vie en rose (DP||模拟) 2016杭电多校联合第二场
  10. Open Street Map—2022年道路数据
  11. css3 border边框斜线,CSS3 斜线分割布局
  12. BZOJ2456mode
  13. 巴比特 | 元宇宙每日必读:HTC 宣布推出首款元宇宙手机,售价约2700元人民币,都有哪些新玩法?...
  14. php 小程序即时聊天,网易云IM小程序聊天室集成。PHP版SDK API使用示例
  15. layui提交成功之后刷新当前页、关闭当前页、刷新父页、重载父页数据表格
  16. 世界上只有两种黑客:俄罗斯黑客和普通黑客
  17. 眉骨高者为大贵之相_眉骨高者为大贵之相 能成大器
  18. 老牛破车般的CSDN博客
  19. Centos修改IP
  20. UiPath流程设计器介绍

热门文章

  1. [bat] cmd命令进入用户登录界面和屏幕保护程序
  2. 一些关于吸血鬼的词汇
  3. UE4 角色上下车功能
  4. 如何将数据移动到新硬盘(装机)
  5. OpenCV读取显示图片报错size.width>0
  6. mongdb 鉴权失败,添加用户数据失败
  7. tomcat 日志报错 java.lang.UnsupportedClassVersionError: com/wlt/controller/IndexController
  8. neo4j java json_如何将Neo4j JSON转换为Java Object
  9. 页面怎么导出html文件大小,报表HTML导出时自适应页面大小
  10. html模块 码工助手,码工助手在线布局使用注意事项