OnSelectSlot 在移动浏览器中不起作用。在 Android 设备中,我使用 chrome 浏览器对其进行了调试,但它不起作用。在 IOS 设备中,我使用 Safari 浏览器进行了调试,但也无法正常工作。在计算机浏览器中,单击它时可以流畅地运行,但在手机上则不然。有谁知道解决这个问题的方法?
下面是代码-------
<BigCalendar
selectable
events={[
{
id: 0,
title: <div>{this.state.morningShiftAppointments + this.state.eveningShiftAppointments}<br/>
<div>{this.state.morningShiftAppointments}/{this.state.eveningShiftAppointments}</div>
</div>,
allDay: true,
start: new Date(this.state.year, this.state.month, this.state.date),
end: new Date(this.state.year, this.state.month, this.state.date),
}
]}
views={['month']}
onSelectSlot={this.onSelectSlot.bind(this)}
dayPropGetter={customDayPropGetter}
longPressThreshold={1}
defaultDate={new Date()}
eventPropGetter={
(event, start, end, isSelected) => {
let newStyle = {
backgroundColor: "lightgrey",
color: 'black',
borderRadius: "0px",
border: "none",
minWidth: "100%"
};
return {
className: "",
style: newStyle
};
}
}
/>