Skip to content
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

🐛Fix date picker hanging when manually editing year #15668

Merged
merged 2 commits into from May 31, 2018

Conversation

cvializ
Copy link
Contributor

@cvializ cvializ commented May 30, 2018

The date picker currently hangs if you chang the date in the text box from "05/05/2018" to "05/05/201". This PR resolves that issue by preventing the widget from attempting to render thousands of dates in the past. Once the root cause for the poor perfomance is found, this restriction can be lifted. I expect this will improve the experience for the vast majority of use-cases, while negatively impacting very few.

The user may still manually click month after month to select a date in the distant past beyond 1900, or may type a date in the distant past beyond 1900. If the user types the date beyond 1900 they will not see it reflected in the picker.

@cvializ cvializ requested review from cathyxz and aghassemi May 30, 2018 18:21
@aghassemi aghassemi self-assigned this May 30, 2018
Copy link
Contributor

@cathyxz cathyxz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could also be literally that rendering thousands of dates in the past is slow. ¯_(ツ)_/¯

@aghassemi aghassemi assigned cvializ and unassigned aghassemi May 30, 2018
@cvializ cvializ merged commit 22d2c9a into ampproject:master May 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants