周视图中的完整日历更改日期格式

时间:2012-09-06 09:01:35

标签: javascript jquery fullcalendar

我在我的项目中使用了FullQuery的jQuery插件。在fullCalendar周视图中,我可以看到以下列格式显示日期的行: -

Sunday 9/6Monday 9/7Tuesday 9/8等......

实际上,我希望将month/day的位置改为day/month

如何初始化设置?谢谢!

4 个答案:

答案 0 :(得分:21)

您需要使用columnFormat选项进行自定义。

columnFormat: {
            month: 'ddd',
            week: 'ddd d/M',
            day: 'dddd d/M'
        }

在此fiddle中展示。如果这有帮助,请告诉我!

答案 1 :(得分:2)

查看fullcalendar文档中的title_format选项:http://arshaw.com/fullcalendar/docs/text/titleFormat/并在fullcalendar选项中设置所需的格式。

您还可以查看here以查看所有日历视图的格式选项。

答案 2 :(得分:0)

对于那些使用FullCalendar v3的人 似乎配置已经改变。

您可以使用columnHeader格式,文本或Html属性
正如这篇非常好的文档中所解释的:
https://fullcalendar.io/docs/date-display

并将其应用于此之后的不同观点:
https://fullcalendar.io/docs/view-specific-options

答案 3 :(得分:0)

您可以使用V5 (Version 5)使用任何类型的日期格式,这用于全日历dayHeaderFormat: this.dayHeaderFormatUsingMoment,
这是fullcalendar配置选项。

dayHeaderFormatUsingMoment(info) {
    return moment(info.date.marker).format("ddd, DD/MM/YYYY"); //output : Tue, 21/07/2020
}

这是javascript函数。

select id, min(name) as name
from emp
group by id
having min(name) = max(name) and min(name) = 'Jon';
相关问题