FullCalendar 4.3.1中文模式下在IE11中显示两个月字
FullCalendar 4.3.1中文模式下在IE11中显示两个月字,标题、还有提示等
如图
为了快速修改,使用简单的替换,修改main.js,找到了3出需要替换的地方
(1)
CalendarComponent.prototype.render = function (props) { this.freezeHeight(); var title = this.computeTitle(props.dateProfile, props.viewSpec.options); if (title.indexOf("月月") != -1) { title = title.replace("月月", "月"); } this._renderToolbars(props.viewSpec, props.dateProfile, props.currentDate, props.dateProfileGenerator, title); this.renderView(props, title); this.updateSize(); this.thawHeight(); };
(2)
function htmlEscape(s) { if (s.indexOf("月月") != -1) { s = s.replace("月月", "月"); } return (s + '').replace(/&/g, '&') .replace(/</g, '<') .replace(/>/g, '>') .replace(/'/g, ''') .replace(/"/g, '"') .replace(/\n/g, '<br />'); }
(3)
Toolbar.prototype.updateTitle = function (text) { findElements(this.el, 'h2').forEach(function (titleEl) { if (text.indexOf("月月") != -1) { text = text.replace("月月", "月"); } titleEl.innerText = text; }); };
重新预览页面,问题解决