WeekView
This is normally used as a mode of a Calendar (as seen in the live demo below) but may be used standalone as a regular Widget.
//<code-header>
fiddle.title = 'Calendar week view';
//</code-header>
const calendar = new Calendar({
appendTo : targetElement,
height : 500,
date : new Date(2020, 8, 2),
modes : {
day : null,
week : true,
month : null,
year : null,
agenda : null
},
events : [
{ startDate : '2020-09-02T07:00', duration : 5, durationUnit : 'h', name : 'Walk the dog', eventColor : 'yellow' },
{ startDate : '2020-09-03T09:00', duration : 2, durationUnit : 'h', name : 'Buy masks', eventColor : 'orange' },
{ startDate : '2020-09-04T07:00', duration : 1, durationUnit : 'h', name : 'Zoom meeting', eventColor : 'deep-orange' },
{ startDate : '2020-09-05T09:00', duration : 1, durationUnit : 'h', name : 'Get a haircut', eventColor : 'gray' }
]
});As a standalone widget, it will lack the capabilities of the Calendar class, such as keyboard-based event to event navigation and drag/drop features. As seen in this demo:
//<code-header>
fiddle.title = 'Week view';
//</code-header>
new WeekView({
appendTo : targetElement,
height : 500,
startDate : new Date(2020, 8, 2),
endDate : new Date(2020, 8, 7),
dayStartTime : 7,
dayEndTime : 16,
events : [
{ startDate : '2020-09-02T07:00', duration : 5, durationUnit : 'h', name : 'Walk the dog', eventColor : 'yellow' },
{ startDate : '2020-09-03T09:00', duration : 2, durationUnit : 'h', name : 'Buy masks', eventColor : 'orange' },
{ startDate : '2020-09-04T07:00', duration : 1, durationUnit : 'h', name : 'Zoom meeting', eventColor : 'deep-orange' },
{ startDate : '2020-09-05T09:00', duration : 1, durationUnit : 'h', name : 'Get a haircut', eventColor : 'gray' }
]
});A Panel which displays up to 7 columns of days with events for each day arranged in ascending time order in each column.
All day events, and multi day events which intersect that day are displayed in a row at the top.
Intra day events are arranged in ascending time order down the column from the dayStartTime to the dayEndTime
Event rendering can be customized using the eventRenderer method.
Configs
190
Configs
190Content
CSS
DOM
Float & align
Layout
misc
Misc
Other
Scrolling
Properties
162
Properties
162Common
Class hierarchy
Other
Returns the resource associated with this week view when used inside a ResourceView