ui-日历:如果时间小于上午 9 点,则事件不包括结束日期

ui-calender : event not including end date if time is less than 9 am

我正在使用 angular ui 日历插件,它使用 fullcalendar 在日历上显示事件。我遇到了一个奇怪的结果。如果事件在上午 9 点之前结束,则呈现的事件不包括结束日期。

这是我的两个事件:

 $scope.staticEvents = [
    {
      title: 'Static 1', 
    end: new Date(2015, 10, 30, 8, 30, 0, 0),
    start: new Date(2015, 10, 26, 8, 0, 0, 0)

    },
     {
       title: 'Static 2', 
      end: new Date(2015, 10, 30, 9, 0, 0, 0),
      start: new Date(2015, 10, 26, 8, 0, 0, 0)
      }
  ];

请在此处找到代码:plunker

如何在此场景中包含事件的结束日期?代码中是否缺少任何内容?

谢谢。

这是因为 nextDayThreshold 在 fullCalendar 中默认设置为上午 9 点。您需要将其重置为凌晨 12 点。

更多信息here

你在你的控制器中设置这个选项是这样的:

$scope.uiConfig = {
  calendar:{
  nextDayThreshold:'00:00:00'
  }
};