私はreact-big-calendar(fullcalendar.js)のmomentLocalizer(moment.js)を設定するにはどうすればよいですか?
がimport BigCalendar from 'react-big-calendar';
import moment from 'moment';
BigCalendar.setLocalizer(
BigCalendar.momentLocalizer(moment)
);
私のコードは、私はそれを試してみましたが何であれ
var moment = require('moment');
var momentLocalizer = require('react-widgets/lib/localizers/moment');
import BigCalendar from 'react-big-calendar';
BigCalendar.setLocalizer(
BigCalendar.momentLocalizer(moment.locale('en'))
);
let MyCalendar = props => (
<div>
<BigCalendar
/>
</div>
);
は動作しませんreact-big-calendar を使用してgitのから 例を必要とするローカリゼーションを実装するために助けが必要だ
Uncaught TypeError: moment is not a function
cldr-dataとglobalize ...インストールしなければならなかったもの。あなたの助けをありがとう – user3315525
私は同様の質問があります:私は英語で私のBigCalendarがカスタムタイムゾーンではなく、ヨーロッパ/ロンドンしたい。それをどうすれば実現できますか? – Pawel