Fix setting calendar's locale.

master
Tom Hacohen 2017-12-10 13:14:36 +00:00
parent f4d49488a9
commit 86c5a822cb
1 changed files with 2 additions and 1 deletions

View File

@ -2,9 +2,11 @@ import * as React from 'react';
import BigCalendar from 'react-big-calendar';
import 'react-big-calendar/lib/css/react-big-calendar.css';
import * as moment from 'moment';
import 'moment/locale/en-gb';
import { EventType } from './pim-types';
moment.locale('en-gb');
BigCalendar.momentLocalizer(moment);
class Calendar extends React.Component {
@ -48,7 +50,6 @@ class Calendar extends React.Component {
onSelectEvent={(event: any) => {
this.props.onItemClick(event);
}}
{...{culture: 'en-GB'}}
eventPropGetter={eventPropGetter}
date={this.state.currentDate}
onNavigate={(currentDate: Date) => { this.setState({currentDate}); }}