FullCalendar: show reversed list views

前端 未结 3 1077
野的像风
野的像风 2021-01-14 22:10

How can I reverse the events in the list views, so that the event with the most futuristic date appears at the beginning (top)?

3条回答
  •  南笙
    南笙 (楼主)
    2021-01-14 22:34

    Here's the version I use (fullCalendar v4):

    datesRender: function(info) {
        var list = $(info.el).find('.fc-list-table tbody');
        list.find('.fc-list-heading').each((i,heading) => {
          var children = $(heading).nextUntil('.fc-list-heading')
          list.prepend(children)
          list.prepend(heading)
        })
    },
    

提交回复
热议问题