Hi,
I am using bryntum calendar in resourceview mode right now. Code used -
date:theStartDate,
modeDefaults: {
startDate: theStartDate,
dayStartTime: 6.5,
dayEndTime: 20,
visibleStartTime: 7,
hourHeight: 140,
range: 4,
coreHours: {
start: 7,
end: 19, //overlayDay: true
},
},
modes: {
day: null,
week: null,
month: null,
year: null,
agenda: null,
dayresource: {
hideNonWorkingDays: false,
showHeaderAvatars: false,
minResourceWidth: "10em",
},
}
Present functionality -
Onclick of nextButton and prevButton it shows next 4(range) days and previous 4 days.
Required functionality -
I want to customize the onclick functionality of prevButton and nextButton in toolbar in order to move by only one day at a time instead of moving by range mentioned in the picture above i.e 4
For example in current active view if I can see dates 12,13,14,15 ; onclick of nextButton I want active view to show 13,14,15,16 ; and onclick of prevButton I want active view to show 11,12,13,14.
Current active view -
OnAction of nextButton required view -
OnAction of prevButton required view -
How can I customize the prevButton and nextButton for above functionality, what props should be modified to achieve above functionality
tbar: {
items: {
prevButton : {
label : 'Next',
ref: 'prevButton',
onAction : () => {
theStartDate = DateHelper.add(theStartDate, -1, 'day')
}
},
nextButton : {
label : 'Next',
ref: 'nextButton',
onAction : () => {
theStartDate = DateHelper.add(theStartDate, 1, 'day')
}
},
Reference used: https://bryntum.com/products/calendar/docs/api/Calendar/view/Calendar#config-tbar