-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
Min and max properties of ion-datetime are not working properly #17060
Comments
ion datetime has a lot of issues, see collected here -> #16630 I added yours to the list because you made some easy understandable codes to reproduce :) |
@iAmAnkeeta |
We are having the exact same issue here. A quick fix for this would be awesome. (related to this Ionic 3 bug - 12319) |
Hi there, Thanks for the issue! I’ve added this to issue #16630 to keep track of. We’re going to close out the individual issues and address all of the Datetime issues at once. We’re not forgetting about your issue, just trying to keep them all together. Thanks for using Ionic! |
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. |
Bug Report
Ionic version:
[x] 4.0.0-rc.1
Current behavior:
The selected date on the datetime picker does not update while choosing a date, this has a few issues with the min and max properties:
min property
If I set the the
min
property to today's date, the datetime picker does not show the past days from the current month as expected. But when scrolling to the next month, the previous days are still not available in the picker. To select a day that is lower than the current day, you need to first select the next month, tap "Done" and then open the picker again and select the desired day.E.g.:
If I want to select 2nd of February, I need first to select February, then re-open the picker and select the day.
max property
A similar issue happens with the max property. If you set the
max
property to any month in the future, you can first scroll to a day that is after the max day, and then scroll to the month from themax
property. This will allow you to select a date that is after themax
property. When using(ionChange)
to view these values, you can check that the emitted value is actually after themax
property.Expected behavior:
When using the datetime picker, I expect to be able to select any value between the
min
andmax
properties, without having to close and open the picker again to update the available options.Steps to reproduce:
For
min
bug:Use the code below and scroll down to
Feb
. Days between 1 and 11 are to available unless you clickdone
and open again.For
max
bug:Use the code below and scroll down to day
30
. Scroll down to May and you will be able to select a date after2019-05-11
.Related code:
Please, update the plunker links to provide a Ionic 4 same app 👍
Other information:
Ionic info:
Disclaimer: English is not my native language so the issue description might be a bit confusing. Please let me know if you need a clearer example in order to reproduce this issue.
The text was updated successfully, but these errors were encountered: