官网  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(){
    //定义获取到日期后的操作...
};

相关文章:

  • 2021-12-02
  • 2021-09-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-04
  • 2021-05-20
  • 2022-12-23
  • 2021-09-16
  • 2022-12-23
  • 2021-06-15
  • 2022-12-23
相关资源
相似解决方案