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

class .ui-inputwrapper-filled is not removed on Calendar #2326

Closed
cagataycivici opened this issue Mar 17, 2017 · 0 comments
Closed

class .ui-inputwrapper-filled is not removed on Calendar #2326

cagataycivici opened this issue Mar 17, 2017 · 0 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@cagataycivici
Copy link
Member

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")

[x ] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

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

@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Mar 17, 2017
@cagataycivici cagataycivici added this to the 2.0.4 milestone Mar 17, 2017
@cagataycivici cagataycivici self-assigned this Mar 17, 2017
cagataycivici pushed a commit that referenced this issue Mar 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

1 participant