John Magnolia
John Magnolia

Reputation: 16793

fullcalendar week date format to: 23 - 29 Sep 2012 instead of: Sep 23 - 29 2012

Using the titleFormat I have:

$calendar.fullCalendar({
    titleFormat: {
        month: 'MMMM yyyy',                            // September 2009
        week: "MMM d[ yyyy]{ '—'[ MMM] d yyyy}", // Sep 7 - 13 2009
        day: 'dddd, MMM d, yyyy'                       // Tuesday, Sep 8, 2009
    }

Doc: http://arshaw.com/fullcalendar/docs/text/titleFormat I dont understand what the [ and { mean.

When I try: d '—' d MMM [ yyyy]{[ MMM] yyyy} it shows: 23 - 23 Sep 2012

Upvotes: 1

Views: 2462

Answers (1)

ganeshk
ganeshk

Reputation: 5621

Try this:

titleFormat: {
  month: 'MMMM yyyy',
  week: "d[ MMM][ yyyy]{ '—' d MMM yyyy}",
  day: 'dddd, MMM d, yyyy'
}

Upvotes: 3

Related Questions