zoukankan      html  css  js  c++  java
  • jquery日期控件+时分秒

    因为项目需要,一些时间上的查询要精确的时分.先看下效果图吧。

    所需要的js 跟css 文件

    jsp://特别注意引入的先后顺序

    <link rel="stylesheet" href="${pageContext.request.contextPath }/css/jqueryui/jquery-ui-timepicker-addon.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath }/css/jqueryui/demos.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath }/css/jqueryui/jquery-ui.css">

    <script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath }/js/jqueryui/jquery-ui.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath }/js/jqueryui/jquery-ui-timepicker-addon.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath }/js/jqueryui/jquery-ui-timepicker-zh-CN.js"></script>

    $(function(){($('#startDate').datetimepicker({

    changeMonth: true,  月份可更改     

     changeYear: true, //年可更改

     timeFormat: "HH:mm:ss",//时分秒显示格式

     dateFormat: "yy-mm-dd",//年月日显示格式

      dayNamesMin: [ "七","一", "二", "三", "四", "五", "六"],//一周中文显示       

      monthNamesShort: ["一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "十一", "十二"],//月份中文显示

        stepHour: 2, //时间选择隔2小时,可选择      

        stepMinute: 10,       

        stepSecond: 10,//步长

    showHour:true,//是否显示小时

    showMinute:true,

    showSecond:true,

    });
    });

    到此就可以完成啦。

  • 相关阅读:
    Delphi 字符串操作
    SQL Browser (数据浏览器)
    .NET 3.5和VS 2008中的ASP.NET AJAX(转帖)
    delphi 最快速编码 URLDecode URLEncode
    Delphi 2007 如何安装控件
    Delphi TWebBrowser编程简述(转帖)
    delphi TStringList的用法
    Javascript+xmlhttp调用Webservice以及注意事项
    使用VSS 的Shadow folder的一点问题
    delphi 如何将XML格式的字符串导入ClientDataSet中
  • 原文地址:https://www.cnblogs.com/cbdd/p/5506080.html
Copyright © 2011-2022 走看看