bootstrap-datatimepicker双击失效问题解决。
来源:互联网 发布:闲鱼拒绝退款 淘宝介入 编辑:程序博客网 时间:2024/06/11 00:27
最近在项目中引用了bootstrap-datatimepicker控件,但是发现该控件在日期选择框弹出状态下再次点击input则日期选择框消失但再次点击input日期选择框不再弹出。
解决办法:
在日期控件的show方法中给input加上disabled属性。在hide方法中取消disabled属性。
show: function (e) { this.picker.show(); this.height = this.component ? this.component.outerHeight() : this.element.outerHeight(); if (this.forceParse) { this.update(); } this.element[0].disabled = true; this.place(); $(window).on('resize', $.proxy(this.place, this)); if (e) { e.stopPropagation(); e.preventDefault(); } this.isVisible = true; this.element.trigger({ type: 'show', date: this.date });},hide: function (e) { if (!this.isVisible) return; if (this.isInline) return; this.picker.hide(); $(window).off('resize', this.place); this.viewMode = this.startViewMode; this.showMode(); if (!this.isInput) { $(document).off('mousedown', this.hide); } this.element[0].disabled = false; if ( this.forceParse && ( this.isInput && this.element.val() || this.hasInput && this.element.find('input').val() ) ) this.setValue(); this.isVisible = false; this.element.trigger({ type: 'hide', date: this.date });},
经测试未出现双击日期控件后日期控件失效的情况。
js下载链接:bootstrap-timepicker.js
0 0
- bootstrap-datatimepicker双击失效问题解决。
- bootstrap datatimepicker 兼容问题
- Bootstrap模态框使用WebUploader点击失效问题解决
- Bootstrap模态框使用WebUploader点击失效问题解决
- Bootstrap模态框使用WebUploader点击失效问题解决
- datatimepicker
- SpringMVC JSP文件加载bootstrap 路径失效问题解决
- bootstrap中日期时间控件datatimepicker的用法
- Html学习-之bootstrap,datatables,datatimepicker,java string截取
- 日期 bootsrtap-datatimepicker and bootstrap-datepicker 控件支持中文
- 日期 bootsrtap-datatimepicker and bootstrap-datepicker 支持中文
- bootstrap datatimepicker 时间选择插件---精确到时分秒
- ebs双击失效的排查
- bootstrap modal 弹出失效
- javac.exe失效问题解决
- eclipse快捷键失效问题解决
- 远程桌面剪贴板失效问题解决
- _blank失效问题解决
- VMware下的Ubuntu14.04用ifconfig不能显示ip地址的解决方案
- 链表各类操作详解
- Hotfix KB2731284 or later update is installed, no need to zero-out data files
- CSS浮动与定位(二)
- 【Flask】HTTP的异常
- bootstrap-datatimepicker双击失效问题解决。
- 简洁的弹框JS
- WebApp开发-Google官方教程
- java程序中前后台交互的两种实现方式以及页面之间的跳转
- Java操作文件
- liunx服务器时间、时区设置(解决快、慢8小时问题)
- 14实践项目1.2
- javacv根据别人的修改的关于对图片操作的工具类
- PAT A1050