I'm trying to make a calendar of event using react-native-big-calendar
when i believe it's suppose to work with both start and end time, but somehow it's not work when i uncomment the end property
here are the codes:
const events = [
{
title: 'Meeting',
start: new Date(2020, 5, 20, 10, 0),
// end: new Date(2020, 5, 20, 22, 30),
},
{
title: 'Coffee break',
start: new Date(2020, 1, 14, 15, 45),
// end: new Date(2020, 1, 14, 16, 30),
},
{
title: 'Repair my car',
start: new Date(2020, 5, 20, 7, 45),
// end: new Date(2020, 5, 20, 13, 30),
},
]
class BookingListScreen extends Component {
constructor(props) {
super(props);
this.state = {
}
}
render() {
console.log('logged by phuognn start: ', new Date(2020, 5, 20, 10, 0));
console.log('logged by phuognn end: ',new Date(2020, 5, 20, 22, 30));
return (
<View style={{ flex: 1 }}>
<Calendar
height={Dimensions.get('window').height}
style={styles.calendar}
events={events}
height={600}
eventCellStyle={{ backgroundColor: 'blue' }}
/>
</View>
);
}
}
if I uncomment the end property of events, the calendar show no event.
Wonder why?