【Vue】fullcalendar - next ,prev切换回调处理

(4条消息) fullcalendar - next ,prev等切换月份回调处理_Q.E.D.的博客-CSDN博客_fullcalendar prev这篇博客所说,fullcalendar next ,prev等切换月份的按钮是没有回调函数,需要在customButtons中添加自定义按钮

customButtons: {
  next: {
    click: this.nextClick
  },
  prev: {
    click: this.prevClick
  }
},

methods中

复制代码
  nextClick(mouseEvent, htmlElement) {
        console.log("next.............")
        this.$refs.fullCalendar.getApi().next() // 将日历向前移动一步(例如,一个月或一周)。

     // 打印日历显示的时间范围 console.log(this.$refs.fullCalendar.getApi().view.currentStart.getTime()); console.log(this.$refs.fullCalendar.getApi().view.currentEnd.getTime()); // 如果dayGridMonth查看日历,则将日历向前移动一个月。 // 如果日历位于dayGridWeek或中timeGridWeek,则将日历向前移动一周。 // 如果日历位于dayGridDay或中timeGridDay,则将日历向前移动一天。 }, prevClick(mouseEvent, htmlElement) { console.log("prev.............") this.$refs.fullCalendar.getApi().prev() // 将日历后退一步(例如,一个月或一周)。 // 如果dayGridMonth查看日历,则将日历后移一个月。 // 如果日历位于dayGridWeek或中timeGridWeek,则将日历后移一周。 // 如果日历位于dayGridDay或中timeGridDay,则将日历移回一天。 },
复制代码

 

posted @   梦醒江南·Infinite  阅读(1202)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 字符编码:从基础到乱码解决
历史上的今天:
2016-10-23 C# 读取WAV文件(详细)
点击右上角即可分享
微信分享提示