如何仅在React Fullcalendar中显示工作时间
我有此代码,它是用于为我的日历设置参数的代码:
import timeGridPlugin from '@fullcalendar/timegrid'
import FullCalendar from '@fullcalendar/react'
calevents.push({
title: res.data[i].title,
start: moment(res.data[i].dateTime).toDate(),
end: moment(res.data[i].dateTime).add(2, 'hours'),
displayEventEnd: true,
id: res.data[i]._id,
allDayDefault: false,
slotMinTime: '8:00:00',
slotMaxTime: '18:00:00',
extendedProps: {
description: res.data[i].description
},
})
基本上,我要做的是为日历设置企业
的。使用slotmintime
和slotmaxtime
我认为我可以设置它,但是,它不会更改日历的视图。
我该如何解决?
I have this code which is the code for setting paramaters for my calendar:
import timeGridPlugin from '@fullcalendar/timegrid'
import FullCalendar from '@fullcalendar/react'
calevents.push({
title: res.data[i].title,
start: moment(res.data[i].dateTime).toDate(),
end: moment(res.data[i].dateTime).add(2, 'hours'),
displayEventEnd: true,
id: res.data[i]._id,
allDayDefault: false,
slotMinTime: '8:00:00',
slotMaxTime: '18:00:00',
extendedProps: {
description: res.data[i].description
},
})
Basically, what I am trying to do is set the business hours
of my business for the calendar. Using slotMinTime
and slotMaxTime
I thought I could set it, however, it doesn't change the view of the calendar.
How can I fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论