JS 替换和时间插件的结合使用方法
2018-10-12 13:59
836 查看
// 日期
$('.date').datepicker({
changeYear: true,
changeMonth: true,
minDate:null,
maxDate:null,
onClose: function(selectedDate) {
$('.gap-date').datepicker('option','minDate', '+1m');
}
});
// 日期范围
$('.gap-date').datepicker({
changeYear: true,
changeMonth: true,
maxDate:null,
onClose: function(selectedDate) {
var y, m, d;
var arr = selectedDate.split('-');
y = arr[0];
m = arr[1] - 7;
d = arr[2];
$('.date').datepicker('option','maxDate', new Date(y, m, d));
}
});
您可能感兴趣的文章:
相关文章推荐
- JS 替换和时间插件的结合使用方法
- WdatePicker.js时间日期插件的使用方法
- 日期时间插件flatpickr.js使用方法
- js 弹出框插件实例与代码使用方法
- 缓冲加载图片的 jQuery 插件 lazyload.js 使用方法详解
- SlidesJS基本使用方法和官方文档解释 【Jquery幻灯片插件 Jquery相册插件】
- 缓冲加载图片的 jQuery 插件 lazyload.js 使用方法详解
- JS字符串替换函数全部替换方法 JS 正则表达式如何使用变量
- Jquery 模板插件 jquery.tmpl.js 的使用方法(1):基本语法,绑定,each循环,ajax获取json数据
- JS插件excanvas的使用方法
- WdatePicker.js的使用方法 帮助文档 使用说明(时间控件)
- JQuery缓冲加载图片插件lazyload.js的使用方法
- Repeater使用:绑定时 结合 前台JS及后台共享方法
- 缓冲加载图片的 jQuery 插件 lazyload.js 使用方法详解
- SlidesJS基本使用方法和官方文档解释 【Jquery幻灯片插件 Jquery相册插件】
- js队列方法使用push(xx)结合shift()实现或者使用pop()结合unshift()实现
- 缓冲加载图片的 jQuery 插件 lazyload.js 使用方法详解
- SlidesJS基本使用方法和官方文档解释 【Jquery幻灯片插件 Jquery相册插件】
- 按需加载图片的 jQuery 插件 lazyload.js 使用方法详解
- 缓冲加载图片的jQuery插件lazyload.js 使用方法详解