简体   繁体   中英

fullcalendar.js showing dates twice from json input

I am making a calendar based on dates coming from json input. The problem is even if my json data does not have duplicate dates. its showing two slots of same datetime in one day. I have tried to make the calendar a 24 hours supported calendar as well , but the issue is still there

http://jsfiddle.net/xpsg9pa4/28/

The js calendar code i am using.

    $('#calendar').fullCalendar({
     header: {
        left: 'prev',
        center: 'title',
        right: 'next'
      },
      defaultView:'agendaWeek',
      weekNumberCalculation:'ISO',
      defaultDate: new Date(),
      selectable: false,
      editable: false,
      validRange: {
        start: moment(new Date(Date.now() + 24 * 60 * 60 * 1000)).format('Y-MM-DD')
      },  
      weekNumbersWithinDays: true,
      navLinks: false, // can click day/week names to navigate views
      eventLimit: true, // allow "more" link when too many events



events:[{"title":"17:30","start":"2018-09-27 17:30"},{"title":"18:30","start":"2018-09-27 18:30"},{"title":"19:30","start":"2018-09-27 19:30"},{"title":"20:30","start":"2018-09-27 20:30"},{"title":"21:30","start":"2018-09-27 21:30"},{"title":"22:30","start":"2018-09-27 22:30"},{"title":"23:30","start":"2018-09-27 23:30"},{"title":"00:30","start":"2018-09-28 00:30"},{"title":"01:30","start":"2018-09-28 01:30"},{"title":"02:30","start":"2018-09-28 02:30"},{"title":"15:30","start":"2018-09-28 15:30"},{"title":"17:30","start":"2018-09-28 17:30"},{"title":"18:30","start":"2018-09-28 18:30"},{"title":"19:30","start":"2018-09-28 19:30"},{"title":"20:30","start":"2018-09-28 20:30"},{"title":"21:30","start":"2018-09-28 21:30"},{"title":"22:30","start":"2018-09-28 22:30"},{"title":"23:30","start":"2018-09-28 23:30"},{"title":"00:30","start":"2018-09-29 00:30"},{"title":"01:30","start":"2018-09-29 01:30"},{"title":"02:30","start":"2018-09-29 02:30"},{"title":"15:30","start":"2018-09-29 15:30"},{"title":"17:30","start":"2018-09-29 17:30"},{"title":"18:30","start":"2018-09-29 18:30"},{"title":"19:30","start":"2018-09-29 19:30"},{"title":"20:30","start":"2018-09-29 20:30"},{"title":"21:30","start":"2018-09-29 21:30"},{"title":"22:30","start":"2018-09-29 22:30"},{"title":"23:30","start":"2018-09-29 23:30"},{"title":"00:30","start":"2018-09-30 00:30"},{"title":"01:30","start":"2018-09-30 01:30"},{"title":"02:30","start":"2018-09-30 02:30"},{"title":"17:30","start":"2018-09-30 17:30"},{"title":"18:30","start":"2018-09-30 18:30"},{"title":"19:30","start":"2018-09-30 19:30"},{"title":"20:30","start":"2018-09-30 20:30"},{"title":"21:30","start":"2018-09-30 21:30"},{"title":"22:30","start":"2018-09-30 22:30"},{"title":"23:30","start":"2018-09-30 23:30"},{"title":"00:30","start":"2018-10-01 00:30"},{"title":"01:30","start":"2018-10-01 01:30"},{"title":"02:30","start":"2018-10-01 02:30"}]
      });

The slots such as 2018-09-28 23:30 is being repeated two times

我假设的问题是,如果您不为活动指定结束时间,则将结束时间视为+2小时,如果给定结束时间,则应该可以正常工作。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM