layui时间控件选择时间范围
2024-08-21 05:36:45
layui.use([ 'laydate'], function(){
var $ = layui.$;
var laydate = layui.laydate;
var max = ${nowYear}+"-12-31";
var min = ${nowYear}+"-1-1";
var start = laydate.render({
elem: '#searchJhksrq',
type: 'date',
max: max,
min: min,
showBottom: false,
btns: ['clear', 'confirm'],
done: function(value, date){
endMax = end.config.max;
end.config.min = date;
end.config.min.month = date.month -1;
}
});
var end = laydate.render({
elem: '#searchJhjzrq',
type: 'date',
max: max,
min: min,
showBottom: false,
done: function(value, date){
if($.trim(value) == ''){
var curDate = new Date();
date = {'date': curDate.getDate(), 'month': curDate.getMonth()+1, 'year': curDate.getFullYear()};
}
start.config.max = date;
start.config.max.month = date.month -1;
}
});
});
开始日期:
<input type="text" class="input-text" style="width: 200px" placeholder="开始日期" name="jhksrq" id="searchJhksrq" readonly="readonly" >
截止日期:
<input type="text" class="input-text" style="width: 200px" placeholder="截止日期" name="jhjzrq" id="searchJhjzrq" readonly="readonly" >
最新文章
- Divide and conquer:Aggressive Cows(POJ 2456)
- 【MVC 过滤器的应用】ASP.NET MVC 如何统计 Action 方法的执行时间
- Spring总结—— IOC 和 Bean 的总结
- IDE显示无法打开源文件时解决方案
- ES PES TS
- wchar_t与char、wstring与string的相互转换
- 【剑指offer】连续子数组的最大和
- php 生成唯一的订单
- HTTP协议分析
- stl中的容器、迭代器和算法----vector中的find实现
- Python框架学习之Flask中的蓝图与单元测试
- CentOS 7.2编译安装PHP7
- Oracle 常用的查询操作
- Bellman-Ford算法:POJ No.3169 Layout 差分约束
- vue渲染时对象里面的对象的属性提示undefined,但渲染成功
- BZOJ.2428.[HAOI2006]均分数据(随机化贪心/模拟退火)
- QtGui.QCheckBox
- ngx.location.capture 只支持相对路径,不能用绝对路径
- event chrome firefox 获取点击对象的 id 类
- jQuery 图片自动播放
热门文章
- go语言在Windows系统下编译成linux系统可执行文件
- Linux用户账号文件——passwd
- LabVIEW中的波形图表(Chart)与波形图(Graph)
- C语言常用库函数
- maven项目bulid失败_No compiler is provided in this environment.
- 简单的使用Gson (序列化 和 反序化)
- Python 读写XML文件
- docker限制容器日志大小
- Python的f.seek(offset, whence)函数
- hdu 6059 Kanade&#39;s trio