bootstrap-datepicker隐藏时触发bootstrap的modal的隐藏事件

K_1984 2016-08-03 11:42:46
各位大神,大家好,我在尝试,用bootstrap的datepicker插件时,发现,当选择日期的弹出框,隐藏时,会触发,对应modal的隐藏事件,但是Modal不会隐藏,只是触发事件。
我的目的原本是,当modal,隐藏时,把Modal中的内容,清空,后来发现,加了清空以后,每次当我使用了日期控件,并选择日期,在日期控件隐藏的时候,就把modal中的内容也清除了。
后来我加了alert()去看了一下,发现在datepicker隐藏时,会触发modal的隐藏事件。
求助各位大神,有没有什么办法能让两者分开呢?
或者说,当datepicker隐藏的时候,不会把modal中的内容清空呢?
...全文
1833 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
那一抹夕阳下 2018-10-17
  • 打赏
  • 举报
回复
引用 3 楼 ahpop 的回复:
我是用它搞定的 //DATE PICKER $('.datepicker').datepicker().on('changeDate', function(ev) { // }).on('hide', function(event) { event.preventDefault(); event.stopPropagation(); });
引用 3 楼 ahpop 的回复:
我是用它搞定的 //DATE PICKER $('.datepicker').datepicker().on('changeDate', function(ev) { // }).on('hide', function(event) { event.preventDefault(); event.stopPropagation(); });
解决了 大神厉害
SovereignJ 2018-01-24
  • 打赏
  • 举报
回复
引用 3 楼 ahpop 的回复:
我是用它搞定的 //DATE PICKER $('.datepicker').datepicker().on('changeDate', function(ev) { // }).on('hide', function(event) { event.preventDefault(); event.stopPropagation(); });
大神厉害,的确解决了!但是为啥这样写捏
lign0214 2017-02-22
  • 打赏
  • 举报
回复
引用 3 楼 ahpop 的回复:
我是用它搞定的 //DATE PICKER $('.datepicker').datepicker().on('changeDate', function(ev) { // }).on('hide', function(event) { event.preventDefault(); event.stopPropagation(); });
确实解决了问题
ahpop 2016-10-25
  • 打赏
  • 举报
回复
我是用它搞定的 //DATE PICKER $('.datepicker').datepicker().on('changeDate', function(ev) { // }).on('hide', function(event) { event.preventDefault(); event.stopPropagation(); });
K_1984 2016-08-03
  • 打赏
  • 举报
回复
楼主小白,第二次发帖不太会使用。。。。 再补充一个问题,上面的图片大家也看到了,后台是Date传过来的数据,能不能传来的时候,正好就是2016-08-03 这种格式呢?多谢大家了!
K_1984 2016-08-03
  • 打赏
  • 举报
回复

上一张图片说明情况。
这是销量第一的后台管理模版,非常值得购买。这是keenthemes开发的后台管理bootstrap MetroNic模版,一共两套。 是我用20美刀买回来的,里面包含所有资源,甚至说明文档和可以修改的PSD文件,这是完整版,共 【以后所有更新免费提供给下载过的人】 兼容IE8及以上的浏览器。 1.5.4更新记录如下: Version 1.5.4 – 21 November 2013 Metronic Admin(LTR & RTL versions): Update: Bootstrap 3.0.2 New: Dashboard With Horizontal Menu New: User Session Timeout Plugin Integration New: User Idle Timeout Plugin Integration New: Sidebar Toggler Button On Header New: Ajax Datatable Integration New: jQuery Flot Bar Chart Samples New: Button Dropdown Menu with Search box Enhancement: Datepicker with Disabled Past Dates Fixed: Bootstrap Modal Issue(when modal opened the page content shifts to the right) Fixed: Bootstrap TouchSpin spinUpClass Parameter Issue Fixed: Bootstrap Tab Activation Through URL Issue(parent tabs are not activated) Fixed: Bootstrap WYSIWYG5 Modal Dialogs Issue(duplicated modal containers when bootstrap modal plugin used) Fixed: Selected Theme Color Not Applied To Horizontal Menu Fixed: Login Form Submit Issue Metronic Frontend(LTR & RTL versions): Update: Bootstrap 3.0.2 New: Header Fixed Page Fixed: Typo in style.css Fixed: FAQ page wrong tab active Version 1.5.3 – 8 November 2013 Metronic Admin(LTR & RTL versions): New: Bootstrap TouchSpin Plugin Integration New: Bootstrap Date Paginator Plugin Integration New: Bootbox.js Plugin Integration New: Input Group, Icon Input, Markdown Input Validation Samples Enhancement: Button Dropdown Menu With Multilevel Submenu Enhancement: Bootstrap Switch Samples with Long Text Update: Font Awesome 4.0.1 Fixed: Main Content Height Issue with Fixed Layout on Large Screens Fixed: Language Switch Bar Layout Issue on Mobile Devices Fixed: Image Crop Samples Issue on 1024 screen resolution

87,910

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧