Bootstrap DateTimePicker选择月份BUG
来源:互联网 发布:java 工程师 简历 编辑:程序博客网 时间:2024/05/18 21:38
今天碰到的一个新问题:
当前月份为7月份.Bootstrap DateTimePicker在选择月份时,发现6月份为禁用,但是本地并没做任何限制,所以百度了下,知乎出现了解决方案:
详见地址:https://www.zhihu.com/question/39414586
引用原答案:
这样修改不能解决根本问题。
var months = this.picker.find('.datetimepicker-months') .find('th:eq(1)') .text(year) .end() .find('span').removeClass('active');
这种情况months得到的数组长度有时为12,有时为14(包含左右箭头符合)
711行左右修改为:
var months = this.picker.find('.datetimepicker-months').find('th:eq(1)').text(year).end().find('span.month').removeClass('active');
//这样得到的months数据始终是正确的。
if (currentYear == year) { // getUTCMonths() returns 0 based, and we need to select the next onemonths.eq(this.date.getUTCMonth()).addClass('active');}
作者:曾玲
链接:https://www.zhihu.com/question/39414586/answer/187519910
来源:知乎
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
阅读全文
1 0
- Bootstrap DateTimePicker选择月份BUG
- bootstrap datetimepicker 选择月份 选择年
- bootstrap-datetimepicker v3 月份错误
- bootstrap-datetimepicker 时间选择
- bootstrap-datetimepicker 选择日期
- bootstrap-datetimepicker bootstrap选择日期
- bootstrap-datetimepicker的bug整理
- bootstrap-datetimepicker的bug整理
- bootstrap datetimepicker 插件语言选择
- 日期选择框datetimepicker选择固定月份日期
- bootstrap datetimepicker添加秒钟选择下拉框
- bootstrap datetimepicker添加秒钟选择下拉框
- bootstrap-datetimepicker时间段区间选择的问题
- bootstrap-datetimepicker选择年和月
- bootstrap-datetimepicker 日期选择控件 通用版
- 日期选择控件bootstrap-datetimepicker demo
- bootstrap-datetimepicker:基于twitter bootstrap的日期/时间选择控件
- bootstrap-datetimepicker:基于twitter bootstrap的日期/时间选择控件
- uva 10892 求a,b 最小公倍数为m a,b这样的数有多少个
- HDU 6034 Balala Power!(进制)
- Error:(30, 13) Failed to resolve: com.github.bumptech.glide:glide:3.7.0
- 颜色代码大全
- 微信小程序,时间戳转为日期格式
- Bootstrap DateTimePicker选择月份BUG
- OpenGL ES应用开发实践指南(android 卷)笔记 第二章1
- spring+SpringMVC+Mybatise实现用户登录后挤掉前面的用户
- 数据库设计(一)
- 去掉超链接或按钮点击时出现的虚线边框
- Virustotal——md5转sha256
- 安卓自定义 View 进阶:Path 完结篇
- mysql中log-bin日志设置
- mysql处理海量数据时的一些优化查询速度方法