angular / material

Material design for AngularJS
https://material.angularjs.org/
MIT License
16.55k stars 3.39k forks source link

datepicker: calendar not showing when browser is zoomed and md-max-date is in the past #11138

Open Arns opened 6 years ago

Arns commented 6 years ago

Bug, feature request, or proposal:

Tested on Macbook Pro 2015 - Firefox, Chrome.

When zooming the browser out to anything less than 100% for Chrome, a date-picker who's max-date is set to a date before today will not display the calendar on initial load. Upon scrolling, the calendar appears.

What is the expected behavior?

The calendar should appear on initial load, regardless of zoom level.

What is the current behavior?

Calendar is blank on date-picker when browser is zoomed out to any percent on Chrome. Firefox is more picky and required, in my setup, to be zoomed out to 67%.

CodePen and steps to reproduce the issue:

CodePen Demo which shows your issue: https://codepen.io/anon/pen/oEQOJX
Detailed Reproduction Steps:

1) create a standard Material date-picker 2) Set md-max-date to a date BEFORE today 3) Zoom browser out to any level for Chrome (should be <100%), for my setup Firefox needs to be zoomed out to 67% 4) Click on date-picker input arrow to open widget 5) Issue should present itself

What is the use-case or motivation for changing an existing behavior?

Causing UX issues when calendar is blank.

Which versions of AngularJS, Material, OS, and browsers are affected?

As far as I'm aware, all versions. Specifics: Material: <=1.1.7 AngularJS: <=1.6.7 OS: MacOS High Sierra Browser: Chrome <= 64, Firefox <= 58

Is there anything else we should know? Stack Traces, Screenshots, etc.

From my debugging, it seems unlikely to be an issue with the virtual repeat, but rather an issue with how datepicker interacts with the virtual repeat. Seems likely to be some sort of race condition. Here are some screenshots:

36497873-32a587b6-1702-11e8-9ced-4091d25ecef9

36492010-bd4917c2-16f1-11e8-8335-2591b2148dc6

Splaktar commented 6 years ago

Great write up, thank you! I can reproduce this very easily on Chrome now.

Jackson-joe commented 2 years ago

Hi @Splaktar I am having the same issue in a windows chrome browser, my angular material version is 1.1.10 and angularjs version is 1.7.9 . Any suggestions would be helpful. Thanks.

Jackson-joe commented 2 years ago

Hi @Splaktar I am having the same issue in a windows chrome browser, my angular material version is 1.1.10 and angularjs version is 1.7.9 . Any suggestions would be helpful. Thanks.

Hey guys, I still have the same issue when the browser size is more than the 100%, any way to handle it?

Splaktar commented 2 years ago

@Jackson-joe yes, this is still an open issue and a workaround is not defined above, nor do I know of one at this time.

Unfortunately, this project has reached End of Life (EOL) status, so this issue will not be fixed.

You can find more detail in our recent blog post: https://blog.angular.io/discontinued-long-term-support-for-angularjs-cc066b82e65a

Jackson-joe commented 2 years ago

@Jackson-joe yes, this is still an open issue and a workaround is not defined above, nor do I know of one at this time.

Unfortunately, this project has reached End of Life (EOL) status, so this issue will not be fixed.

You can find more detail in our recent blog post: https://blog.angular.io/discontinued-long-term-support-for-angularjs-cc066b82e65a

thanks @Splaktar