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(MdInput): Input should not be treated as empty if it is a date field. #846

Merged
merged 20 commits into from
Sep 6, 2016
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 Jul 12, 2016
17465c9
fix(MdInput): Input should not be treated as empty if it is a date fi…
drager Jul 12, 2016
5262e6b
fix(md-input): Check for type in empty getter instead
drager Jul 12, 2016
121486a
test(MdInput): Add tests for empty check
drager Jul 14, 2016
22b0576
test(MdInput): Update empty check tests to match the other tests new …
drager Jul 14, 2016
07885d0
test(MdInput): Fix linting issue
drager Jul 15, 2016
b434d54
Merge branch 'master' of github.com:angular/material2
drager Jul 20, 2016
e4dc755
fix(md-input): Check for type in empty getter instead
drager Jul 12, 2016
9dabcc0
fix(MdInput): Input should not be treated as empty if it is a date fi…
drager Jul 12, 2016
5bc3f61
fix(md-input): Check for type in empty getter instead
drager Jul 12, 2016
ece4232
test(MdInput): Add tests for empty check
drager Jul 14, 2016
920da03
test(MdInput): Update empty check tests to match the other tests new …
drager Jul 14, 2016
4cdac2b
Merge branch 'fix-md-input-date' of github.com:drager/material2 into …
drager Jul 20, 2016
8987153
test(MdInput): Skip empty check tests for IE11
drager Jul 27, 2016
62e0fa5
Merge branch 'master' of github.com:angular/material2
drager Jul 27, 2016
c089b27
Merge branch 'master' into fix-md-input-date
drager Jul 27, 2016
a0b2e26
test(MdInput): Resolve linting issues
drager Jul 27, 2016
883e2fb
Merge branch 'master' of github.com:angular/material2
drager Sep 6, 2016
5882611
Merge branch 'master' into fix-md-input-date
drager Sep 6, 2016
ba12423
test(MdInput): Update empty() check tests to match new test syntax
drager Sep 6, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/input/input.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

<label class="md-input-placeholder"
[attr.for]="inputId"
[class.md-empty]="empty"
[class.md-empty]="empty && type !== 'date'"
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

@devversion devversion Jul 12, 2016

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 the date is part of the is empty check.

Copy link
Contributor Author

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.

[class.md-focused]="focused"
[class.md-float]="floatingPlaceholder"
[class.md-accent]="dividerColor == 'accent'"
Expand Down