admin管理员组

文章数量:1327750

I'm trying to upgrading fullCalendar from 1.6 to 3.0

Previously my titleFormat was :

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

Now I use the view specific options as describe in the titleFormat documentation :

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

But I can't reproduce the same text for the week. Indeed, according to the formatRange documentation:

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

Am I missing something ?

I'm trying to upgrading fullCalendar from 1.6 to 3.0

Previously my titleFormat was :

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

Now I use the view specific options as describe in the titleFormat documentation :

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

But I can't reproduce the same text for the week. Indeed, according to the formatRange documentation:

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

Am I missing something ?

Share Improve this question edited Nov 8, 2016 at 19:40 George Kagan 6,1348 gold badges49 silver badges50 bronze badges asked Nov 8, 2016 at 15:27 PakPak 2,7763 gold badges22 silver badges28 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 6

I got the answer on github

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

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

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

本文标签: javascriptCustom titleFormat for week view in fullCalendarStack Overflow