Skip to content
This repository was archived by the owner on Dec 1, 2023. It is now read-only.

fix(datepicker): unable to select the same date as minDate#2266

Merged
mgcrea merged 3 commits intomgcrea:masterfrom
prashanth2692:datepicker-validation-fix
Feb 23, 2018
Merged

fix(datepicker): unable to select the same date as minDate#2266
mgcrea merged 3 commits intomgcrea:masterfrom
prashanth2692:datepicker-validation-fix

Conversation

@prashanth2692
Copy link
Copy Markdown
Contributor

Due to passing string with 'Z' into Date constructor the date value is being offset by browser's timezone which is causing the the datepicker to disable the day which is passed as minDate. Effectively not allowing to select the date which is set as minDate. This will be reproducible for user on East of UTC.

To fix the issue, checking for 'Z' in the date string and excluding it to get the Date object with the expected date.

@prashanth2692
Copy link
Copy Markdown
Contributor Author

@mgcrea, please review this PR.

@mgcrea mgcrea merged commit 7e8a6d3 into mgcrea:master Feb 23, 2018
daviddutch pushed a commit to daviddutch/angular-strap that referenced this pull request Oct 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants