嗨,即使它显示在 react-dev 工具中,我也看不到月视图。周视图工作正常,但月视图不显示任何内容。PFA 下面的代码。
这是周视图图像。
这是月视图图像。
import localizer from 'react-big-calendar/lib/localizers/globalize';
import globalize from 'globalize';
import BigCalendar from 'react-big-calendar';
import events from './events';
import 'react-big-calendar/lib/css/react-big-calendar.css';
import './prism.less';
localizer(globalize);
const allViews = Object.keys(BigCalendar.views).map(k =>
BigCalendar.views[k])
export class EventDetailModal extends React.Component { // eslint-
disable-line react/prefer-stateless-function
render() {
return (
<BigCalendar
{...this.props}
events={events}
views={allViews}
defaultDate={new Date(2015, 3, 1)}
/>
);
}
}
export default EventDetailModal;