web-components
web-components copied to clipboard
[date-picker] today button does not work if max is today
Description
When adding a date-picker and setting the max to the current date, clicking today does not update the value.
However, when opening the Development Tools in e.g. in Chrome, Firefox or Safari, the value gets updated.
When the date-picker needs to scroll to display the current date, things seem to work again.
I have reproduced this also using the live demo (https://vaadin.com/docs/latest/components/date-picker) by specifying the max property there.
Expected outcome
I would expect Today is always updating the value as long as min <= date <= max.
Minimal reproducible example
<vaadin-date-picker label="Start date" max="2024-06-09"></vaadin-date-picker>
Steps to reproduce
Does not work:
- Add date-picker
- Set max to current date
- Open overlay
- Select current date
- Close overlay
- Open overlay
- Click
Today
Does work:
- Add date-picker
- Set max to current date
- Open overlay
- Select date in last month
- Close overlay
- Open overlay
- Click
Today
Environment
Vaadin version(s): 24.3, 24.4 OS: Mac OS 14.5
Browsers
Chrome, Firefox, Safari