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

md-label with <md-input md-type="time"> should have the active class set up #310

Closed
Ganbin opened this issue Nov 2, 2016 · 5 comments
Closed

Comments

@Ganbin
Copy link
Contributor

Ganbin commented Nov 2, 2016

I find out that if I use that kind of input : <md-input md-type="time" md-label="startTime" md-value.bind="Start Time"></md-input>

The Start Time label is on the same line as the --:-- empty value or even on a entered value like 12:15. I see that to put a active class on the label could be more appropriate with this kind of input because it always display something in the input.

I have take a look at the code of the input/input.js and I have added this 3 lines in the attached(), which make the trick :

if (this.mdType === 'time') {
    $(this.input.labels).addClass('active');
}

I don't know if you think it a good idea?

@Ganbin
Copy link
Contributor Author

Ganbin commented Nov 2, 2016

This is on chrome... but still have the md-input with md-label display issue on safari :(

@Thanood
Copy link
Collaborator

Thanood commented Nov 2, 2016

Thanks for the report, perfect timing. I will have to do some modifications anyway. 😄
As for #309, maybe I need to reactivate these lines: https://github.com/aurelia-ui-toolkits/aurelia-materialize-bridge/blob/master/src/input/input.css#L1-L6

I'm not sure though.

@Thanood
Copy link
Collaborator

Thanood commented Nov 2, 2016

Reproduced it here:
https://gist.run/?id=7192c3cfc552a44f1ab07592d6a7f903

I wonder if Materialize itself has support for time inputs and if so, where we failed to transfer this. 😃

@Thanood
Copy link
Collaborator

Thanood commented Nov 2, 2016

The real problem with this issue is that Materialize doesn't update time inputs. 😕
https://github.com/Dogfalo/materialize/blob/master/js/forms.js#L6

@Thanood Thanood closed this as completed in 9c5f631 Nov 2, 2016
@Thanood
Copy link
Collaborator

Thanood commented Nov 2, 2016

Added static "active" to label when it's a time input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants