React-big-calendar: How do I set date format??

Created on 10 Apr 2017  路  1Comment  路  Source: jquense/react-big-calendar

  componentWillMount(){
    moment.locale('ko');
    BigCalendar.momentLocalizer(moment);
  }

 let formats = {
      dayFormat: (date, culture, localizer) =>
        localizer.format(date, 'ddd MM/dd', culture),
    }

<DragAndDropCalendar selectable
                             events={calendarData}
                             onEventDrop={::this.moveEvent}
                             messages={messages}
                             formats={formats}
                             onSelectSlot={::this.onSelectSlot}
                             onSelectEvent={::this.onSelectEvent} />

The following error occurs :
debuggability.js:874 Unhandled rejection TypeError: Cannot read property 'filter' of undefined

Most helpful comment

This is my code ,they are only for your reference.

  let formats = {
    timeGutterFormat: 'HH:mm',
    eventTimeRangeFormat: ({
        start,
        end
      }, culture, local) =>
      local.format(start, 'HH:mm', culture) + '-' +
      local.format(end, 'HH:mm', culture),
    dayFormat: 'MM-DD' + ' ' + '鏄熸湡' + 'dd',
    agendaTimeRangeFormat: ({
        start,
        end
      }, culture, local) =>
      local.format(start, 'HH:mm', culture) + '-' +
      local.format(end, 'HH:mm', culture),
    agendaDateFormat: 'MM-DD' + ' ' + '鏄熸湡' + 'dd',

  }

>All comments

This is my code ,they are only for your reference.

  let formats = {
    timeGutterFormat: 'HH:mm',
    eventTimeRangeFormat: ({
        start,
        end
      }, culture, local) =>
      local.format(start, 'HH:mm', culture) + '-' +
      local.format(end, 'HH:mm', culture),
    dayFormat: 'MM-DD' + ' ' + '鏄熸湡' + 'dd',
    agendaTimeRangeFormat: ({
        start,
        end
      }, culture, local) =>
      local.format(start, 'HH:mm', culture) + '-' +
      local.format(end, 'HH:mm', culture),
    agendaDateFormat: 'MM-DD' + ' ' + '鏄熸湡' + 'dd',

  }
Was this page helpful?
0 / 5 - 0 ratings

Related issues

nicolasriccardi picture nicolasriccardi  路  3Comments

bionicvapourboy picture bionicvapourboy  路  3Comments

martinnov92 picture martinnov92  路  3Comments

Beyazatli picture Beyazatli  路  3Comments

ZacharyLangley picture ZacharyLangley  路  3Comments