search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Change the amount of days on screen, scroll through entire year

Asked by Ruud
4 years ago.

Hello,
I am using the latest angular schedular pro version.
I am using the zoomlevels to show an x amount of days on the screen. This doesn't seem to cover my use-case.

What i would like to do is have an entire year of events loaded. And choose the amount of days on the screen. It is like a sliding window, of for example one moth, that can scroll over one year.
The current zoomlevels just show you the amount of days that you put in the days property. Now maybe this could be done by calculating the cellWidth. But for this i would need the size of the area where cells are shown. And knowing how many cells i want to show horizontally i could set a cell width.

I was wondering if there is an easier way of doing this? Or is you have any other suggestions on creating a sliding window view of x days over a year.

Answer posted by Dan Letecky [DayPilot]
4 years ago.

Yes, you'd have to calculate the cellWidth based on the viewport size. Something like this:

cellWidth: function(args) { var days = args.date.daysInMonth(); return Math.floor(dp.nav.scroll.clientWidth/days); }

This will adjust the cell width in order to match the current month.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.