reactjs - ReactJS禁用在完整日历中的选定日期之外拖动
问题描述
我有一个标准的完整日历设置,带有拖放交互插件。我的问题是如何处理拖放选择,以及如何处理移动设备上的触摸事件。我在完整的日历文档中找不到任何有用的东西。最重要的是,我想禁用在选定日期之外的拖动,是否可以编写自定义函数来处理这一切?
从“@fullcalendar/react”导入 FullCalendar 从“@fullcalendar/daygrid”导入 dayGridPlugin 从“@fullcalendar/timegrid”导入 timeGridPlugin 从“@fullcalendar/interaction”导入interactionPlugin 从“@fullcalendar/core/locales-all”导入 allLocales来自“@fullcalendar/moment-timezone”的 momentTimezonePlugin
<FullCalendar
nowIndicator
plugins={[momentTimezonePlugin, timeGridPlugin, dayGridPlugin, interactionPlugin]}
initialView="timeGridWeek"
headerToolbar={{
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay',
}}
ref={calendarRef}
editable
selectable
selectMirror
dayMaxEvents
weekends
select={(e) => handleEventAdd(e)}
eventClick={(e) => handleEventUpdate(e)}
events={currentevents}
eventDrop={(e) => handleupdateSchedule(e)}
/>
解决方案
推荐阅读
- javascript - es6可以导入commonjs模块吗?
- azure - 能否将 Azure 逻辑应用变量输出到文件并存储在 Blob 存储中?
- vue.js - mdb 数据表在 Vue.js 中不呈现数据
- jenkins - 使用 Jenkins 管道仅执行选定的作业
- javascript - Chart.js 只是最后一点
- php - 如何重定向子文件夹中的所有请求
- python - 如何在 Singularity 配方中激活 Anaconda 环境
- android - 使用 androidx NotificationManagerCompat 无法解析符号“来自”
- autohotkey - 在自动热键中的目录表达式中是非法的
- angular - Angular 材质动态单选按钮可以选择多个,但应该只允许在一个组中使用一次