当我更改一周(TimeGridWeek)时
我目前正在创建一个日历,该日历链接到PHP文件,该文件返回使用Eventsources
的JSON。一切都按照我的意愿运行,问题是当我想在5周内看到日历中的内容时,我点击了下周的5倍,但是FullCalendar在5周内加载了5周,即使我只需要最后一个。日历会等待最后一个请求加载,然后再进入下一个请求。
当我单击“下一个/上周”按钮时,有没有办法告诉FullCalendar停止请求? (API非常慢,需要〜1S-2S加载,我无能为力),
谢谢
。 nofollow noreferrer“>
I am currently creating a calendar that linked to a php file returning a json with eventSources
. Everything works as I want, the problem is when I want to see in 5 weeks what is in the calendar, I click 5x for the next week but fullcalendar loads the 5 weeks, even if I only need the last one. And calendar waits for the last request to load before moving on to the next one.
Is there a way to tell fullcalendar to stop the requests when I click on the "next/previous week" button? (the api is very slow and takes ~1s-2s to load and I can't do anything to change that)
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
简短的答案是...不,你不能。
但是有一些替代方案,例如1)添加额外的按钮以提前或向后移动4-5周或2)添加一个按钮以选择日期/周(例如,使用任何datepicker wittget)
在此处拥有您的代码(摘录)这两个选项都假设您可以使用jQuery的datepicker(或任何其他),并且使用FullCallendar的V5:
The short answer is... no, you cannot.
But there are some alternatives, like 1) adding extra buttons to move 4-5 weeks ahead or back or 2) adding a button to select a date/week (for example with any datepicker widget)
Here you have the code (excerpt) for both options, assuming that you can use jquery's datepicker (or any other one) and you use v5 of FullCallendar: