-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Show input mask on blank field #80
Comments
Like a HTML5 placeholder attribute or like maskedinput plugin? |
Would a feature like the maskedinput be possible? So an option make the mask visible on a blank field, but also while the user is typing? |
@andrewrota It's not on my plans to be equal of maskedInput. Personally, I also think that we can solve that problem using an simple placeholder. Increase the source code for this?... I don't know... jQuery Mask Plugin is here to be lightweight.. I have to be careful when coding new features. |
+1 I was using maskedinput but due lack of support for complex masks I'm migrating the code to this plugin. I used the visible placeholder feature and would like to keep it. I don't think it would add too weigth to the library. |
@hugochinchilla On the way maskedInput implements, yes it would... unfortunately. But, I'm totally open for pull requests... Maybe I'm seeing this wrong. |
There is two ways I see on implementing this feature the easy one and hard one: 1 - Simply converting your mask like .mask('00/00/0000') to a HTML5 place holder like |
I like the "fancy" way, but you've got a point. Will try to think of a simple and lightweight solution later. |
;) |
When this will be available? |
@anilkumar8212 read the thread... and help me with it ;-) |
@igorescobar the other day I read your reply by email and I didn't notice the formating in the first option you propose. I like it, there is no real need for the "fancy" way in option 2. The library could use the html5 place holder when available, and perhaps implement a polyfill when not. |
@hugochinchilla jQuery Mask will never let you insert a value in value attribute field which is not valid so... the polyfill version is kind of... tough to implement without broke other stuffs. |
I'm not going to implement the "MAGIC" placeholder because it adds unecessary complexity to the code in case of recursive masks so I just added support to the HTML5's placeholder and you can check it out with v1.6.0. $('.field').mask('00/00/0000', {placeholder: "__/__/____"}); Enjoy it ;) |
any dateformat? like mm/dd/yyyy? |
Is there an option to show the mask on blank field (e.g. underscores (__) __ - ___ ).
I think that it would be helpful for the user to know what is expected format in advance.
The text was updated successfully, but these errors were encountered: