Add the possibility to set minDuration and maxDuration to TimeController
paolovalerdi opened this issue · 3 comments
Currently, the TimeController
only allows to set a maxRange
that limits scrolling when zooming out, which is not ideal if you want to show all the 24 hours but limiting the min and max amount of hours displayed on the screen when zooming out/in. It would be nice if there were the possibility to set two news properties to customize how the zoom works.
minDuration
: Unlike the current property, this would now define how many "hours" are visible on the screen when zooming out
maxDuration
: This would now take the place of the current 'minDuration', which means that it limits how many hours are visible on the screen when zooming in.
The new property is available as part of v1.0.0-alpha.5. However, I kept the current minDuration
(instead of renaming that) as I think that naming them this way around is a bit more intuitive.
Out of curiosity: Why would you limit how far the user can zoom out when they are allowed to see the full day anyway?
@JonasWanke I have similar case. Problem is that on small screen size allowing to zoom out to see entire day can make the layout not useful. Google calendar for instance has different limits (landscape vs portrait) in mobile app based on available screen size
It's mostly form the UX perspective. Since not only representation suffer, but also ability to select particular time slot