如何在fullcallendar v5基本版本中将当前视图传递给事件ajax调用

发布于 2025-01-16 15:11:52 字数 630 浏览 3 评论 0原文

我需要在任何 ajax 调用中以及每次日历网格更改时将当前视图传递给 ajax 调用

events: {
url: "{{route('clientSessionData')}}",
extraParams: {
    current_view_type: vm.type, // in here I want to pass current view now I stored it in vue element
},
    // our hypothetical feed requires UNIX timestamps
data: {
},
error: function() {
    $('#script-warning').show();
},
success: function(){
    console.log("successful: You can now do your stuff here. You dont need ajax. Full Calendar will do the ajax call OK? "); 
    // calendar.render();  
},
color: 'yellow',   // a non-ajax option
textColor: '#ffffff', // a non-ajax option,

},

I need to pass current view to ajax call in any ajax call and every time calendar grid changed

events: {
url: "{{route('clientSessionData')}}",
extraParams: {
    current_view_type: vm.type, // in here I want to pass current view now I stored it in vue element
},
    // our hypothetical feed requires UNIX timestamps
data: {
},
error: function() {
    $('#script-warning').show();
},
success: function(){
    console.log("successful: You can now do your stuff here. You dont need ajax. Full Calendar will do the ajax call OK? "); 
    // calendar.render();  
},
color: 'yellow',   // a non-ajax option
textColor: '#ffffff', // a non-ajax option,

},

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜是你 2025-01-23 15:11:52

您可以按如下方式获取 FullCalendar v5 视图

calendar.view.name

例如 timeGridWeek

这就是您想要的吗?

You can get the FullCalendar v5 View as follows

calendar.view.name

For example timeGridWeek

is this what you are after?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文