I have a react big calendar as in teh picture below, and I want to remove the circled strat-time/end time:

The react big calendare is rendered with this parameters:
<BigCalendar
selectable
events={this.props.events?this.props.events:[]}
views={{ week:MyWeek}}
defaultView='week'
defaultDate={this.state.date?this.state.date:new Date()}
date={this.state.date?this.state.date:new Date()}
now={new Date(0)}
min={new Date(this.state.today.getFullYear(), this.state.today.getMonth(), this.state.today.getDate(), 8)}
max={new Date(this.state.today.getFullYear(), this.state.today.getMonth(), this.state.today.getDate(), 20)}
onSelectSlot={(slotInfo) => {this.props.onSelectSlot('interview', slotInfo, 'add'); store.dispatch(addBreadcrumb({name: B_PREPARATION_INTERVIEW}));}}
onSelectEvent={event => {this.props.onSelectEvent('interview', event); store.dispatch(addBreadcrumb({name: B_PREPARATION_INTERVIEW}));} }
onNavigate={(date) => this.changeDate(date)}
components={{event: Event }}
eventPropGetter={(this.eventStyleGetter)}
titleAccessor={function(e) {console.log("aaaaaaaaaaa"); console.log(e); return e.title;}}
/>
I tried to add titleAccessor to remove the start time/end time but with no result.
You can override the CSS class rbc-event-label like so:
.rbc-event-label {
display: none;
}
to hide the start and end times.
Following the formats section in the documentation:
const formats = {
eventTimeRangeFormat: () => {
return "";
},
};
<Calendar formats={formats} />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With