Fullcalendar不显示15分钟插槽的轴时间

时间:2014-01-15 16:20:47

标签: jquery fullcalendar

我将我的fullcalendar设置为有15分钟的时段,但它没有显示分钟突破。

例如,它将显示上午9点,上午10点,上午11点等但不是上午9点,上午9点15分,上午9点30分等。

它显示了其他时段的分钟突破,例如10分钟,但是我无法让它在15分钟内工作。

我环顾四周,发现了这篇文章:How to show all text on the axis for each minute slots rather than just 6am, 7am etc

但我找不到用户在其提议的分辨率中指的功能。也许这个剧本从那时起就更新了。

有谁知道如何才能显示分钟突破?

6 个答案:

答案 0 :(得分:5)

我知道这已经很长时间了,但对于遇到同样问题的人,您可以尝试使用:

slotDuration: '00:15:00',
slotLabelInterval: 15,
slotLabelFormat: 'h(:mm)a',
在fullcalendar v2中

答案 1 :(得分:1)

您应该像下面的示例一样初始化您的日历。 请参阅我的jsfiddle示例了解您的解决方案。 https://jsfiddle.net/ahmetyildirim/pk7na5jL/

适用于Fullcalendar v3.2.0。

$(document).ready(function() {

  $('#calendar').fullCalendar({
    weekends: false, // will hide Saturdays and Sundays
    header: {
      left: 'prev,next today',
      center: 'title',
      right: 'agendaWeek,month,agendaDay'
    },
    defaultView: "agendaWeek",
    businessHours: {
      // days of week. an array of zero-based day of week integers (0=Sunday)
      dow: [1, 2, 3, 4, 5], // Monday - Friday

      start: '08:00', // a start time (8am in this example)
      end: '18:00' // an end time (6pm in this example)
    },
    minTime: '06:30:00',
    maxTime: '19:30:00',
    slotDuration: '00:15:00',
    slotLabelInterval: 15,
    slotLabelFormat: 'h(:mm)a',
    defaultDate: '2016-01-12',
    slotMinutes: 15,

    events: [{
      title: 'test',
      start: '2016-01-11T09:30:00',
      end: '2016-01-11T12:30:00'
    }]
  });

});

答案 2 :(得分:0)

我明白了。如果您注释掉,请使用fullcalendar.min.js:

u=h.getMinutes();

它将在Y轴上正确显示分钟。我找不到它的位置,因为我上面链接的其他帖子没有使用脚本文件的“min”版本。

答案 3 :(得分:0)

我找不到@Cineno声明的行。相反,我编辑了这一行:

th class='fc-agenda-axis "+u+"'>"+(!ya||!ja?D(w,y("axisFormat")):"& nbsp;"+D(w,y("axisFormat")))+"/th>

添加+D(w,y("axisFormat"))) after & nbsp;

适合我。

答案 4 :(得分:0)

为了使它工作,我需要改变

((!slotNormal || !minutes) ? formatDate(d, opt('axisFormat')) : ' ') +

((!minutes) ? formatDate(d, opt('axisFormat')) : "<small>" + formatDate(d, ':mm') + "</small>") +

我会说最好的方法是添加一个选项ex。 “axisSlotFormat”

答案 5 :(得分:0)

你正在实施议程周刊,议程日吗?

header: {
left: 'title',
center: '',
right: 'prev,today,next,month,agendaWeek,agendaDay'
},

由于

相关问题