Skip to content

DateTimePicker doesn't fit nicely in a FormLayout with labels set on the side #5074

@OlliTietavainenVaadin

Description

@OlliTietavainenVaadin

Description

DateTimePicker set in a FormLayout with labels set to the side doesn't fit the bounds of the form cell.

Possibly related issue: #808

Expected outcome

DateTimePicker should respect the cell boundaries

Minimal reproducible example

public class HelloWorldView extends Div {
    public HelloWorldView() {
        setSizeFull();
        FormLayout formLayout = new FormLayout();
        formLayout.addFormItem(new TextField(), "TextField 1");
        formLayout.addFormItem(new TextField(), "TextField 2");
        formLayout.addFormItem(new DateTimePicker(), "DateTimePicker 1");
        formLayout.addFormItem(new DateTimePicker(), "DateTimePicker 2");
        add(formLayout);
    }
}

Steps to reproduce

Open the view. Resizing the browser window should show the broken behavior at certain breakpoints even with the default settings.
image

Environment

Vaadin version(s): 23.2.8
OS: Windows

Browsers

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions