agendaweek视图中的标题显示会根据加载的fullcalendar js文件而有所不同 [英] Title display in agendaWeek view differs based on fullcalendar js file loaded
问题描述
在agendaweek视图中,根据我加载的fullcalendar.js,在日历标题中显示的日期显示不同。例如,如果我加载了完整的calendar.js文件,它的工作原理应该如下:
2015年2月8日 - 14日
使用此脚本标记:
< script src ='// cdnjs.cloudflare.com/ajax/libs /fullcalendar/2.2.7/fullcalendar.js'></script>
当我尝试通过将缩减版本加载为fullcalendar.min.js来节省带宽时,我得到以下输出:
2月8日 - 14日,2015年
使用脚本标记:
< script src ='// cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.2.7/fullcalendar.min.js'> ;< /脚本>
我的服务器正在输出Content-Type字符集作为UTF-8,我使用元标记http - 也可以设置它。为什么在完整版本中缩小版本的完整日历不能正确显示emdash?
作为后续工作,我使用下载和fullcalendar在本地安装了fullcalendar .min.js文件并且它可以正常工作。所以这让我相信CDNJS上的文件可能会有所不同,但运行的是文件完全匹配的差异返回。什么可能导致这种情况?
您需要编辑titleRangeSeparator部分中的缩小版本。
按Ctrl + F并搜索titleRangeSeparator并将 -
更改为 \\\—
。
但是,如果您不想下载要编辑的文件,则可以在初始化时始终设置选项 titleRangeSeparator
p>
希望这有助于!
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?
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!
这篇关于agendaweek视图中的标题显示会根据加载的fullcalendar js文件而有所不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!