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
{{ message }}
Repository navigation
bug: ion-datetime does not clamp current date to min/max when switching months using month picker #27027
I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v6.x
Current Behavior
ion-datetime does not pin the date to the min/max when switching months with the month picker. If the day of the month is out of range when switching months, a warning is logged to the console and the current date is out of range.
Expected Behavior
The current date should be pinned to the min/max, as it is when using ion-datetime-button.
Steps to Reproduce
Open the reproduction.
Open the console.
Select April 1.
Open the month picker and switch to March. A warning is logged to the console and the current date is March 1, which is out of range.
Select March 30.
Open the month picker and switch to May. A warning is logged to the console and the current date is May 30, which is out of range.
Thank you for the issue. I'm able to reproduce this behavior. Datetime has a clamping util that keeps certain dates within the min/max bounds; it looks like we just need to make sure that gets applied to this scenario too.
changed the title [-]bug: ion-datetime does not pin current date to min/max when switching months[/-][+]bug: ion-datetime does not clamp current date to min/max when switching months using month picker[/+]on Mar 29, 2023
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.
Activity
averyrousseau commentedon Mar 29, 2023
Thank you for the issue. I'm able to reproduce this behavior. Datetime has a clamping util that keeps certain dates within the min/max bounds; it looks like we just need to make sure that gets applied to this scenario too.
[-]bug: ion-datetime does not pin current date to min/max when switching months[/-][+]bug: ion-datetime does not clamp current date to min/max when switching months using month picker[/+]fix(datetime): clamp date between min and max when using month picker (…
averyrousseau commentedon Apr 18, 2023
This has been resolved via #27185 and the fix will be available in a future release of Ionic. Thank you!
fix(datetime): clamp date between min and max when using month picker (…
aparajita commentedon Apr 19, 2023
Thank you!
ionitron-bot commentedon May 19, 2023
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.