在FullCalendar中显示周数 [英] Show week number in FullCalendar

查看:439
本文介绍了在FullCalendar中显示周数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种方式来在议程上显示周数。
我尝试过此方法但没有结果。

I'm looking for a way to show the week number on the agendaWeek view. I've tried this method but without result.

实际上,我需要把这个号码放在这样的日历标题中。

Actually, I need to put the number in the calendar title like this

titleFormat:
        {
            month: "'Calendar<br />'MMMM yyyy",
            week: "'Calendar<br />Week' W",
            day: "'Calendar<br />'dddd dd MMM yyyy"
        }

但是当然'W'不存在,有没有办法呢?

But of course 'W' doesn't exist, is there a way to do that ?

谢谢。

推荐答案

您可以使用以下选项打开FullCalendar中的周数:

You can turn on week numbers in FullCalendar with this option:

$("#calendar").fullCalendar({
  weekNumbers: true
});

以下是相关文档的链接: http://arshaw.com/fullcalendar/docs/display/weekNumbers/

Here's a link to the relevant documentation: http://arshaw.com/fullcalendar/docs/display/weekNumbers/

Btw,如果我以标题格式使用W,则会插入当前周号(以月,周和日为单位)。您是否使用最新版本的FullCalendar?我正在使用v.1.6.1。

Btw, if I use "W" in title format, then the current week number is inserted (both in month, week and day). Are you using the latest version of FullCalendar? I'm using v. 1.6.1.


  • Regin

这篇关于在FullCalendar中显示周数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆