如何在完整日历中自定义具有不同日期和不同时间的周末日期
how to customise weekend dates with differnt dates and with differnts hours in full calendar
我想在月视图中显示带有逐行日期的日历,例如:今天日期 2018-sep-05,我想在日历中显示。
2018-9-05,
2018-9-12,
2018-9-19
2018-9-26,
正如我在周视图中所做的那样 jsfidddle in this is fine,
I want to do same as weekday view jsfidddle2,但是,我的道指问题来了,道指是 3,表示星期三,
我想显示具有相同 dow 和不同 timings 的 5、12、19、26 个日期。
所有我想要的以下时间都应该符合日历
sep05 07am - 09pm,
sep12 08am - 14pm,
sep19 10am - 13pm,
他们有什么方法可以做到吗?
var hiddenDaysObj = [0, 1, 2, 3, 4, 5, 6];
hiddenDaysObj.splice(selDate.getDay(), 1);
const calObj = {
defaultView: 'settimana',
defaultDate: this.cldDate,
editable: true,
selectable: true,
eventLimit: true,
allDaySlot: false,
minTime: '07:00',
maxTime: '22:00',
slotDuration: '00:10:00',
slotLabelInterval: '00:15:00',
weekends: true,
header: {
left: '',
center: '',
right: '',
},
slotLabelFormat: [
'h(:mm) a'
],
viewRender: function (view, element) {
const s = '<div class="appnt-pro-name"><h6>TIME</h6> </div>';
element.find('.fc-axis:eq(1)').html(s);
},
views: {
settimana: {
type: 'agendaWeek',
duration: {
months: 1
},
title: 'agendaWeek',
groupByResource: true,
columnFormat: 'ddd M/D',
},
},
resources: resources,
events: events,
select: select,
hiddenDays: hiddenDaysObj,
schedulerLicenseKey: 'GPL-My-Project-Is-Open-Source'
我终于完成了这个 https://fullcalendar.io/docs/background-events 我已经在事件中推迟了日期和时间。我已经根据我的情况得到了,谢谢@ADyson
这是示例 finalresult jsfiddle
events.push({id:1,
color:"gray",
start:"2018-09-05T10:00",
end:"2018-09-05T19:00",
rendering:"inverse-background",
},{
id:1,
color:"gray",
start:"2018-09-12T08:00",
end:"2018-09-12T13:00",
rendering:"inverse-background",
});
我想在月视图中显示带有逐行日期的日历,例如:今天日期 2018-sep-05,我想在日历中显示。
2018-9-05,
2018-9-12,
2018-9-19
2018-9-26,
正如我在周视图中所做的那样 jsfidddle in this is fine,
I want to do same as weekday view jsfidddle2,但是,我的道指问题来了,道指是 3,表示星期三,
我想显示具有相同 dow 和不同 timings 的 5、12、19、26 个日期。
所有我想要的以下时间都应该符合日历
sep05 07am - 09pm,
sep12 08am - 14pm,
sep19 10am - 13pm,
他们有什么方法可以做到吗?
var hiddenDaysObj = [0, 1, 2, 3, 4, 5, 6];
hiddenDaysObj.splice(selDate.getDay(), 1);
const calObj = {
defaultView: 'settimana',
defaultDate: this.cldDate,
editable: true,
selectable: true,
eventLimit: true,
allDaySlot: false,
minTime: '07:00',
maxTime: '22:00',
slotDuration: '00:10:00',
slotLabelInterval: '00:15:00',
weekends: true,
header: {
left: '',
center: '',
right: '',
},
slotLabelFormat: [
'h(:mm) a'
],
viewRender: function (view, element) {
const s = '<div class="appnt-pro-name"><h6>TIME</h6> </div>';
element.find('.fc-axis:eq(1)').html(s);
},
views: {
settimana: {
type: 'agendaWeek',
duration: {
months: 1
},
title: 'agendaWeek',
groupByResource: true,
columnFormat: 'ddd M/D',
},
},
resources: resources,
events: events,
select: select,
hiddenDays: hiddenDaysObj,
schedulerLicenseKey: 'GPL-My-Project-Is-Open-Source'
我终于完成了这个 https://fullcalendar.io/docs/background-events 我已经在事件中推迟了日期和时间。我已经根据我的情况得到了,谢谢@ADyson
这是示例 finalresult jsfiddle
events.push({id:1,
color:"gray",
start:"2018-09-05T10:00",
end:"2018-09-05T19:00",
rendering:"inverse-background",
},{
id:1,
color:"gray",
start:"2018-09-12T08:00",
end:"2018-09-12T13:00",
rendering:"inverse-background",
});