zoukankan      html  css  js  c++  java
  • js 日期控件laydate使用

     

    官网  http://sentsin.com/layui/laydate/

    1. 下载官网上的压缩包,解压后只需要复制laydate 文件夹到你的项目中;

    2. 在页面引入  <script type="text/javascript" src="js/laydate/laydate.js"></script>

    3. 在页面添加: 

    <div class="inline layinput">
    <input placeholder="YYYY-MM-DD hh:mm:ss" onclick="laydate({istime: true, format: 'YYYY-MM-DD '})">
    <label class="laydate-icon"></label>
    </div>

    4. 设置回调函数;

    <input name="beginDate" value='<s:property value="#beginDate"/>'  class="diyige beginDate" onclick="laydate({choose:beginDateCallBack})"> 
    - 
    <input name="endDate" value='<s:property value="#endDate"/>' class="diyige endDate" onclick="laydate({choose:endDateCallBack})"> 
                            
    function beginDateCallBack(){
        //定义获取到日期后的操作...
    };
  • 相关阅读:
    iOS数据持久化的方式
    Runtime
    <02>
    <01>
    <02>
    UIActivityIndicatorView
    <01>数据存储
    UI<10>
    UI<09>
    UI<08>
  • 原文地址:https://www.cnblogs.com/wenhainan/p/5508265.html
Copyright © 2011-2022 走看看