You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behavior:
When setting the "min" attribute of ion-datetime to a date in the future but before the current day of month (ie: if today is
2021-03-15 and you set the min date to 2022-02-01 (so in the future but to a day before march 15th), the preselected date when opening the component is set to the current day of month in the future (2022-03-15 in our example).
Expected behavior:
When setting a min value in the future, the date displayed on opening the component (when no value is selected) should (in my opinion) be that min date. In the example above that would be 2022-02-01.
Steps to reproduce:
<!-- min value should be set to any year in the future but to a day and month prior to those of the current day --><ion-datetimemin="2022-02-01"></ion-datetime>
Other information:
While I think the expected behavior I proposed would be reasonable I understand this is debatable. Being able to set the opening / pre-selected value (as discussed here #20532) could be an even better solution.
Thanks for the issue. I agree that this is a bug. We are tracking our datetime issues in #16630, so I will close this issue out and add it to our datetime tracker I linked to above.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Ionic version:
[x] 5.5.5
I'm submitting a ...
[x] bug report
[ ] feature request
Current behavior:
When setting the "min" attribute of ion-datetime to a date in the future but before the current day of month (ie: if today is
2021-03-15 and you set the min date to 2022-02-01 (so in the future but to a day before march 15th), the preselected date when opening the component is set to the current day of month in the future (2022-03-15 in our example).
Expected behavior:
When setting a min value in the future, the date displayed on opening the component (when no value is selected) should (in my opinion) be that min date. In the example above that would be 2022-02-01.
Steps to reproduce:
Other information:
While I think the expected behavior I proposed would be reasonable I understand this is debatable. Being able to set the opening / pre-selected value (as discussed here #20532) could be an even better solution.
Ionic info:
The text was updated successfully, but these errors were encountered: