components icon indicating copy to clipboard operation
components copied to clipboard

[BUG] mdInput type="time" - placeholder running over input when time not fully entered

Open nadavten opened this issue 9 years ago • 10 comments

BUG - image

nadavten avatar Jan 17 '17 20:01 nadavten

Works for me in master. Are you using the mdInput directive or the deprecated <md-input> element?

devversion avatar Jan 18 '17 18:01 devversion

md-input. how do u use mdInput ?

nadavten avatar Jan 18 '17 19:01 nadavten

Well, <md-input> has been deprecated in favor of the <input md-input> attribute.

But we also have made some changes to that recently:

  • In Beta.1 it can be used <input md-input>
  • In the future releases it will be <input mdInput>

Here is some info about master: https://github.com/angular/material2/tree/master/src/lib/input

devversion avatar Jan 18 '17 19:01 devversion

<input md-input placeholder="Name" [value]="someValue" type="text"/>

image

nadavten avatar Jan 18 '17 19:01 nadavten

What Angular Material version are you using? - Next time please use the issue template..

devversion avatar Jan 18 '17 19:01 devversion

beta-1

nadavten avatar Jan 18 '17 19:01 nadavten

Be sure to have a <md-input-container> element around it. As in the documentation: https://material.angular.io/components/component/input

devversion avatar Jan 18 '17 19:01 devversion

image

<tr *ngFor="let alarm of alarms">
            <td>
                <md-input-container>
                    <input md-input placeholder="Name" [value]="alarm.name"/>
                </md-input-container>
            </td>

nadavten avatar Jan 19 '17 18:01 nadavten

This is a bug that has been fixed in master, but not yet released. As far as I know, beta.2 should provide support for [value]="alarm.name". Right now when you set value directly, the mdInput directive doesn't register the change (and the placeholder stays in place).

arciisine avatar Jan 19 '17 23:01 arciisine

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.