vaadin / vaadin/framework

Height of the calendar in monthly view is miscalculated when using Valo theme

Open
#6,762 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Stale v7
Dominant language
Java
Stars
1.8k
Forks
717
Avg merge
2d 6h
Merged PRs (30d)
3

Description

Originally by elechim


Hi,

I'm using Vaadin 7.4.6 and I detected a problem with the calendar height when in monthly view.

Setting the height of the calendar ("setHeight("550px")" or "setHeight("100%")") produces the following errors:

  • the last week row is not completely visible
  • the numers of the weeks (on the left) are not aligned with the rows of the weeks

Setting undefined height works fine.

The problem appears only when using the Valo theme (Reindeer theme works fine).

I tested it with the following UI code:

@Override
protected void init(VaadinRequest request) {
    Calendar calendar = new Calendar();
    calendar.setLocale(Locale.ENGLISH);

    //Load events
    setCalendarContainer(calendar);
    setCalendarStartEndDate(calendar);

    calendar.setWidth("100%");

    calendar.setHeightUndefined();_OK
_  calendar.setHeight("550px");  _ERROR
_  calendar.setHeight("100%");    //ERROR

    setContent(calendar);
}

And the following custom theme file:

@import "../valo/valo.scss";
@mixin my-theme {
    @include valo;
        
    .v-calendar
    {
        border: 1px solid black;
    }
}

Imported from https://dev.vaadin.com/ issue #17954

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with Calendar in monthly view using the supplied Vaadin UI code, a fixed or 100% height, and the custom Valo theme. Inspect the monthly calendar layout and theme styling; done means the final week is fully visible and the week numbers align with their rows while fixed, percentage, and undefined heights behave correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.