You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm submitting a ... (check one with "x")
[x] bug report
Current behavior:
A floating label on <ion-datetime> always floats above the input, even if no date is selected. This happens if the ion-datetime has ngModel or is in a formGroup. If it's neither, then it only floats when a date is selected (but then it becomes useless, as you can't actually get the value).
Expected behavior:
The floating label should only float when a date is selected.
Related code: Other information:
I think the issue is in the hasValue() method in base-input.ts. It returns true if the datetime has the "empty" date (which is just {}). Either ion-datetime should have null or undefined value until a date is selected, or it could override hasValue() and return false if the value is {}.
Ionic info:
> ionic info
Your system information:
ordova CLI: 7.0.0
Ionic Framework Version: 3.1.1
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.3.6
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.10.3
Xcode version: Not installed```
The text was updated successfully, but these errors were encountered:
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Ionic version: (check one with "x")
[x] 3.x
I'm submitting a ... (check one with "x")
[x] bug report
Current behavior:
A floating label on
<ion-datetime>
always floats above the input, even if no date is selected. This happens if the ion-datetime hasngModel
or is in aformGroup
. If it's neither, then it only floats when a date is selected (but then it becomes useless, as you can't actually get the value).Expected behavior:
The floating label should only float when a date is selected.
Steps to reproduce:
See this plunker
Related code:
Other information:
I think the issue is in the
hasValue()
method in base-input.ts. It returns true if the datetime has the "empty" date (which is just{}
). Either ion-datetime should have null or undefined value until a date is selected, or it could overridehasValue()
and return false if the value is{}
.Ionic info:
The text was updated successfully, but these errors were encountered: