我用react-big-calendar开发了日历,我想隐藏事件“Congés”的时间范围。
我的日历是:
<DragAndDropCalendar selectable
localizer={localizer}
events={this.state.events}
culture = 'fr'
onSelectEvent={this.clickEvent}
resizable
onNavigate={(date) => { this.setState({ selectedDay: date })}}
onSelectSlot={this.newEvent}
eventPropGetter={
(event, start, end, isSelected) => {
// La rayure du congès
if(event.className === "conge") {
let styleC = {
backgroundColor: '#f740f7',
borderRadius: "0px",
border: "none",
backgroundImage: 'linear-gradient(120deg, #920692 25%, #f740f7 25%, #f740f7 50%, #920692 50%, #920692 75%, #f740f7 75%, #f740f7 100%)',
backgroundSize: '40.00px 69.28px',
fontSize:'40px',
color:'black',
textAlign:'center',
fontFamily:'Andale Mono, monospace',
};
return {
className: "conge",
style:styleC,
};
}
let newStyle = {
backgroundColor: event.color,
borderRadius: "0px",
border: "none"
};
return {
className: "",
style: newStyle,
};
}
}
messages={{"today":"Aujourd'hui", "previous":"<", "next":">", "month":"Mois", "week":"Semaine", "day": "Jour"}}
/>
如何隐藏事件“Congés”的时间范围?