如何使用反应大日历仅显示当前月份和下个月并使其每天动态变化?
我有一个看起来像这样的组件:
import React, {Component} from 'react';
import 'react-big-calendar/lib/css/react-big-calendar.css'
import BigCalendar from 'react-big-calendar';
import moment from 'moment';
import 'moment/locale/pl';
class NewCalendar extends Component {
constructor(props, context) {
super(props, context);
BigCalendar.momentLocalizer(moment);
}
render() {
return (
<div {...this.props}>
<BigCalendar
messages={{next: "Następny", previous: "Poprzedni", today: "Dzisiaj", month: "Miesiąc", week: "Tydzień"}}
culture='pl-PL'
timeslots={1}
events={[]}
views={['month', 'week', 'day']}
min={new Date('2017, 1, 7, 08:00')}
max={new Date('2017, 1, 7, 20:00')}
/>
</div>
);
}
}
export default NewCalendar;
但它只显示从早上 8 点到晚上 8 点的最小和最大小时数,如何将最大值和最小值设置为天?