class .ui-inputwrapper-filled is not removed on Calendar #2326
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
It is possible to wrap a calendar in a .md-inputfield to get the same label-animation as for text-inputs:
<span class="md-inputfield">
<p-calendar [(ngModel)]="calendarModel" [showIcon]="true"></p-calendar>
<label>Date</label>
</span>
This works alright. Except when a date value is selected and removed again. In this case, the label stays at the top and does not return inside the empty input field. For some reason, the class .ui-inputwrapper-filled is not removed on the p-calendar element.
I'm submitting a ... (check one with "x")
Current behavior
(With ultima theme:) Click on p-calendar -> label moves the top -> select a date from the calendar widget -> delete the date in the input field -> exit the input field (klick somewhere else) -> label stays on top (".ui-inputwrapper-filled" is not removed from the p-calendar element)
Expected behavior
Click on p-calendar -> label moves the top -> select a date from the calendar widget -> delete the date in the input field -> exit the input field (klick somewhere else) -> label moves down again (".ui-inputwrapper-filled" is removed from the p-calendar element)
Minimal reproduction of the problem with instructions
<span class="md-inputfield">
<p-calendar [(ngModel)]="calendarModel" [showIcon]="true"></p-calendar>
<label>Date</label>
</span>
What is the motivation / use case for changing the behavior?
Consistent behaviour of labels in form inputs
Please tell us about your environment:
Windows 7 Professional, Webpack, WebStorm
Angular version: 2.0.X
2.4.7
PrimeNG version: 2.0.X
2.0.3
Browser:
56.0.2924.87 (64-bit)
Language: [all | TypeScript X.X | ES6/7 | ES5]
TypeScript 2.1.6
The text was updated successfully, but these errors were encountered: