How to add scrollbar to vaadin 6 Calender

Is it possible to add a scroll bar to a vaadin 6 Calendar ?

I want to show 8 hours in the day view and have a scrollbar to move the visible hours.

I can set calendar StartTime/calendarEndTime, but a scroll bar does not seem to work on vaadin 6 :frowning:

I can put the calendar into a panel with a scrollbar, but then the Calendar header will not be visible when I scroll.

Any suggestions ?

There seems to be
ticket #12538
about the issue. Well, for Vaadin 7.

You can enable scrolling in any HTML element by making it bigger than its containing element and having “overflow: auto” style for it. The heights of Calendar elements are fixed with the style attribute, so you need to use the !important declaration in the height rule.

For example:

.v-calendar-week-wrapper {
    height: 150px !important;
    overflow: auto;

That is a bit violent modification to the styling, and you may need to make other adjustments as well.

You might also want to be able to set a scroll position to some convenient hour, and style tricks would not help with that.

The most flexible solution is to extend the client-side widget of the component, use the overflow-auto technique there in the relevant HTML element, and implement other necessary features.