javascript 周视图中的完整日历更改日期格式
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12296525/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Full calendar change date format in week view
提问by Ham
I'm using FullCalendar plugin for jQuery in my project. In fullCalendar week view, I can see a row showing the date in following format:-
我在我的项目中使用了 jQuery 的 FullCalendar 插件。在 fullCalendar 周视图中,我可以看到一行显示以下格式的日期:-
Sunday 9/6
, Monday 9/7
, Tuesday 9/8
so on...
Sunday 9/6
, Monday 9/7
,Tuesday 9/8
等等...
Actually, I wish to reverse the position of month/day
to day/month
.
其实,我想扭转的位置month/day
来day/month
。
How shall I initialize the setting? Thanks!
我应该如何初始化设置?谢谢!
回答by ganeshk
回答by zelazowy
Look at title_format
option in fullcalendar documentation: http://arshaw.com/fullcalendar/docs/text/titleFormat/and set desired format in fullcalendar options.
查看title_format
fullcalendar 文档中的选项:http://arshaw.com/fullcalendar/docs/text/titleFormat/并在 fullcalendar 选项中设置所需的格式。
You can also look herefor format options for all calendar views.
您还可以在此处查看所有日历视图的格式选项。
回答by Ben
For those who are using the FullCalendar v3
It seems that the configuration has changed.
对于那些使用 FullCalendar v3 的人来说
,似乎配置发生了变化。
You can use the columnHeader Format, Text, or Html properties
As explained in this very nice documentation:
https://fullcalendar.io/docs/date-display
您可以使用 columnHeader 格式、文本或 Html 属性
如这个非常好的文档中所述:https:
//fullcalendar.io/docs/date-display
And apply them to different views following this one:
https://fullcalendar.io/docs/view-specific-options
并将它们应用于以下不同的视图:https:
//fullcalendar.io/docs/view-specific-options