How can get start and end time on fullcalendar?

后端 未结 7 1312
日久生厌
日久生厌 2021-02-12 12:17

how can i get start and end time of visible days in fullcalendar?

I need it for use in another javascript instace. Is there some function like -

相关标签:
7条回答
  • 2021-02-12 12:41

    You need to give id/class what you specified jquery full calendar

        var start_date =  $('#schedule-events').fullCalendar('getView').start
        var end_date  =   $('#schedule-events').fullCalendar('getView').end
    

    Above #schedule-events of the full calendar .. you should give the id of the full calendar

    Example :

       $('#schedule-events').fullCalendar({
    
                eventRender: function(event, element) {
    
              var start_date =  $('#schedule-events').fullCalendar('getView').start
              var end_date  =   $('#schedule-events').fullCalendar('getView').end
              console.log(start_date +'sart----------end date'+end_date)
    
                      }
    

    ......................etc..........

    0 讨论(0)
提交回复
热议问题