更新时间:2023-01-05 18:46:39
将类collapse in
类更改为collapse show
,这就是代码变得不兼容的原因.
Classes collapse in
classes were changed into collapse show
, that's why the code became incompatible.
在您的供应商\ eonasdan \ bootstrap-datetimepicker.src \ js \ bootstrap-datetimepicker.js 中
getTemplate:
getTemplate:
if (hasDate()) {
content.append($('<li>').addClass((options.collapse && hasTime() ? 'collapse in' : '')).append(dateView));
更改为:
if (hasDate()) {
content.append($('<li>').addClass((options.collapse && hasTime() ? 'collapse show' : '')).append(dateView));
}
togglePicker:
togglePicker:
expanded = $parent.find('.in'),
closed = $parent.find('.collapse:not(.in)'),
和
} else { // otherwise just toggle in class on the two views
expanded.removeClass('in');
closed.addClass('in');
更改为:
expanded = $parent.find('.show'),
closed = $parent.find('.collapse:not(.show)'),
和
} else { // otherwise just toggle in class on the two views
expanded.removeClass('show');
closed.addClass('show');