Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selecting 1 day Range #25

Open
ssindelar opened this issue Sep 16, 2021 · 1 comment
Open

Selecting 1 day Range #25

ssindelar opened this issue Sep 16, 2021 · 1 comment

Comments

@ssindelar
Copy link

When I try to select a range of one day. Lets say 16.09.2021 - 16.09.2021. Only the startDate value is shown and set in the returned DateRange. The endDate is null and not shown in the UI.

Expected:
The start and end dates are same and are shown in the UI and also both are returned when calling getValue().

@mlopezFC
Copy link
Collaborator

There is a potential workaround for this. Basically to add a value change listener and set the end date range if it's null. Something like this:

        datePicker.addValueChangeListener(event->{
            DateRange dr = datePicker.getValue();
            if (dr.getEndDate()==null) {
                datePicker.setValue(new DateRange(dr.getStartDate(),dr.getEndDate()));
            }
        });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants