如何解决动态创建的字段上的动态日期选择器
在动态创建的字段上动态添加日期选择器-
这应该根据有关 stackoverflow 的其他问题起作用,但无论我如何更改它,它都对我不起作用。如果我打印出来,jQuery(this) 上有函数 datePicker(),但它没有出现。
我也试过 jQuery(this).datePicker("show");或 .show()
jQuery(document).ready(function(){
jQuery('body').on('click','.hasDatepicker',function(e){ //this gets called,good
jQuery(this).datepicker({ //**this DOESN'T put the datepicker on the element**
minView: 2,dateFormat: 'dd.mm.yy'
});
jQuery(this).addClass( 'testclass' );//this works aswell,so i can see that i have the right element
});
});
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。