Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

fix(datepicker): fix bad valid date check and resize-on-open. #4270

Closed
wants to merge 1 commit into from

Conversation

jelbourn
Copy link
Member

Fixes #4266 and #4267.

@jelbourn jelbourn added this to the 0.11.0 milestone Aug 20, 2015
@@ -185,7 +185,7 @@
* @return {boolean} Whether the date is a valid Date.
*/
function isValidDate(date) {
return date !== null && date.getTime && !isNaN(date.getTime());
return date != null && date.getTime && !isNaN(date.getTime());
Copy link
Contributor

Choose a reason for hiding this comment

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

Would this not be more clear (and consistent with our other code):

return date && date.getTime && !isNaN(date.getTime());

@ThomasBurleson
Copy link
Contributor

@jelbourn - In your efforts to resolve #4267, I now see an artifact where the calendar is positioned partly offscreen:

screen shot 2015-08-20 at 2 33 19 pm

@jelbourn jelbourn closed this in 1fb8ab5 Aug 20, 2015
@jelbourn jelbourn deleted the datepicker-bugs branch September 11, 2015 16:24
kennethcachia pushed a commit to kennethcachia/material that referenced this pull request Sep 23, 2015
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.

2 participants