-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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(MdInput): Input should not be treated as empty if it is a date field. #846
Merged
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
d860394
fix(MdInput): Input should not be treated as empty if it is a date fi…
drager 17465c9
fix(MdInput): Input should not be treated as empty if it is a date fi…
drager 5262e6b
fix(md-input): Check for type in empty getter instead
drager 121486a
test(MdInput): Add tests for empty check
drager 22b0576
test(MdInput): Update empty check tests to match the other tests new …
drager 07885d0
test(MdInput): Fix linting issue
drager b434d54
Merge branch 'master' of github.com:angular/material2
drager e4dc755
fix(md-input): Check for type in empty getter instead
drager 9dabcc0
fix(MdInput): Input should not be treated as empty if it is a date fi…
drager 5bc3f61
fix(md-input): Check for type in empty getter instead
drager ece4232
test(MdInput): Add tests for empty check
drager 920da03
test(MdInput): Update empty check tests to match the other tests new …
drager 4cdac2b
Merge branch 'fix-md-input-date' of github.com:drager/material2 into …
drager 8987153
test(MdInput): Skip empty check tests for IE11
drager 62e0fa5
Merge branch 'master' of github.com:angular/material2
drager c089b27
Merge branch 'master' into fix-md-input-date
drager a0b2e26
test(MdInput): Resolve linting issues
drager 883e2fb
Merge branch 'master' of github.com:angular/material2
drager 5882611
Merge branch 'master' into fix-md-input-date
drager ba12423
test(MdInput): Update empty() check tests to match new test syntax
drager File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be better handled inside of the "empty" getter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I decided to do that in the template since I saw you guys did that with some other things. But it's fixed now in the latest commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any references? I guess in that cases there weren't any getters. If not the getter should probably not include that check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, these lines: https://github.com/drager/material2/blob/d8603948c36de9718e39284e58d12665a53ca569/src/components/input/input.html#L41-L42 as well as line 9.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah thx, yeah that's a difference, since this is just an inline check. And the given variable / getter is only returning the value and not the boolean.
empty
is actually a property, which returns a boolean, which means that the check with thedate
is part of the isempty
check.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, fair enough. The code is updated and correct then.