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
Ion-datetime selects disabeled day when changing month with month year picker #26904
It selects a date in the next or previous month even though they are disabled, when changing the month with the month-year picker.
Expected behavior:
It should just change the month without selecting any dates in the month.
Steps to reproduce:
I want to select multiple days in a ion-datetime to save the selection. When i select a Month like this
and then use this view at the top left and select for example february:
i get the message:
[Ionic Warning]: The value provided to ion-datetime is out of bounds.
Min: {"month":2,"day":15,"year":2023,"hour":23,"minute":0}
Max: {"month":4,"day":15,"year":2023,"hour":22,"minute":0}
Value: [{"year":2023,"month":3,"day":2,"tzOffset":0,"ampm":"pm"},{"year":2023,"month":2,"day":2,"tzOffset":0,"ampm":"pm"}]
and this happens:
it selects a day it shouldn't select due to the fact that its disabled.
Related code:
This is my html:
<ion-datetime
mode="ios"
min="{{this.lastMonth.toISOString()}}"
max="{{this.nextMonth.toISOString()}}"
multiple="true"
color="secondary"
presentation="date"
first-day-of-week="1"
[highlightedDates]="highlightedDates"
>
</ion-datetime>
Last Month in this case is the 15. of the last month and next Month the 15. of the next Month
Other information:
Ionic info:
[Ionic Warning]: The value provided to ion-datetime is out of bounds.
Min: {"month":2,"day":15,"year":2023,"hour":23,"minute":0}
Max: {"month":4,"day":15,"year":2023,"hour":22,"minute":0}
Value: [{"year":2023,"month":3,"day":2,"tzOffset":0,"ampm":"pm"},{"year":2023,"month":2,"day":2,"tzOffset":0,"ampm":"pm"}]
Thanks for the issue! This issue has been labeled as needs reproduction. This label is added to issues that need a code reproduction.
Please reproduce this issue in an Ionic starter application and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.
If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue.
For a guide on how to create a good reproduction, see our Contributing Guide.
This issue is being closed due to insufficient reproduction. If this is still a problem in the latest version of Ionic, please open a new issue and ensure the template is fully filled out. Thank you!
Activity
ionitron-bot commentedon Mar 3, 2023
Thanks for the issue! This issue has been labeled as
needs reproduction. This label is added to issues that need a code reproduction.Please reproduce this issue in an Ionic starter application and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.
If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue.
For a guide on how to create a good reproduction, see our Contributing Guide.
averyrousseau commentedon Mar 17, 2023
This issue is being closed due to insufficient reproduction. If this is still a problem in the latest version of Ionic, please open a new issue and ensure the template is fully filled out. Thank you!