问题描述
在Bootstrap可编辑的情况下使用Bootstrap datetimepicker。以前它显示错误Uncaught TypeError:无法读取undefined的属性'parseFormat'来删除此错误,替换bootstrap-editable.js中的文本,
this.dpg = $.fn.datetimepicker.DPGlobal; and change it to this.dpg = $.fn.bdatepicker.DPGlobal;
但现在显示错误未捕获错误:如果没有输入元素,则无法初始化DateTimePicker
<a href="#" id="last_seen" data-type="datetime" data-pk="1" data-url="/post" title="Select date & time">15/03/2013 12:45</a>
<script>
$(function(){
$('#last_seen').editable({
format: 'yyyy-mm-dd hh:ii',viewformat: 'dd/mm/yyyy hh:ii',datetimepicker: {
weekStart: 1
}
});
});
</script>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)