Title display in agendaWeek view differs based on fullcalendar js file loaded

故事扮演 提交于 2019-12-22 05:06:57

问题


In the agendaWeek view the emdash that displays between the days in the calendar title displays differently based on which fullcalendar.js I load. For example, if I load the full calendar.js file it works as it should:

Feb 8 — 14, 2015

using this script tag:

<script src='//cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.2.7/fullcalendar.js'></script>

When I try to save bandwidth by loading the minified version as fullcalendar.min.js I get the following output:

Feb 8 — 14, 2015

Using the script tag:

<script src='//cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.2.7/fullcalendar.min.js'></script>

My server is outputting the Content-Type charset as UTF-8, and I use the meta tag http-equiv to set it as well. Why would a minified version of full calendar not properly display the emdash while the full version does?

As a follow-up, I installed fullcalendar locally using the download and the fullcalendar.min.js file and it works correctly. So that led me to believe the file on CDNJS might be different but running a diff return that the files match exactly. What could be causing this?


回答1:


You will need to edit the minified version in the titleRangeSeparator section. Do Ctrl+F and search titleRangeSeparator and change — to \u2014.

But if you don't want to download the file to edit you can always set the option titleRangeSeparator on initialization.

Hope this helps!




回答2:


I was facing the same issue with fullcalendar week view. The problem here may not be of encoding but a missing "lang-all.js" along with the "lang" folder that comes with the package. Please go through all the js files and compare with the default package. In my case this was the problem and by including these missing files the issue was resolved.

Hope this would be helpful.



来源:https://stackoverflow.com/questions/28491639/title-display-in-agendaweek-view-differs-based-on-fullcalendar-js-file-loaded

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!