fullCalendar 中周视图的自定义 titleFormat

Custom titleFormat for week view in fullCalendar

我正在尝试将 fullCalendar 从 1.6 升级到 3.0

之前我的标题格式是:

titleFormat: {
    month: "MMMM yyyy",
    week: "'Week from 'd [MMMM] { 'to' d MMMM  yyyy}",
    day: "dddd d MMMM yyyy"
},

现在我使用 titleFormat documentation 中描述的视图特定选项:

    views: {
        month: {
            titleFormat: "MMMM YYYY",                  
        },
        week: {
            columnFormat: "dddd d",            
        },
        day: {
            titleFormat: "dddd d MMMM YYYY",
            columnFormat: "dddd d",           
        }
    },

但我无法在一周内重现相同的文本。事实上,根据 formatRange 文档:

FullCalendar will intelligently use it to format both dates with a dash in between.

我是不是漏掉了什么?

我在 github

上得到了答案

possible with the momentjs literal text formatting (with the [ ] commands) as well as the undocumented titleRangeSeparator setting:

views: {
  week: {
    titleFormat: '[Week from] D MMMM YYYY',
    titleRangeSeparator: ' to ',
  }
}, 

http://jsbin.com/nuruxizuli/1/edit?js,output