This repository was archived by the owner on Dec 11, 2017. It is now read-only.
Add custom date placeholders#218
Closed
simonschaufi wants to merge 1 commit intodigitalBush:masterfrom
Closed
Conversation
Author
|
oh, while browsing through other pull requests, i found #182 which is almost the same. |
Owner
|
Thank you for the suggestion! This is why I exposed the hook to allow custom placeholders. Until we have a date specific mask option, I'd like to hold off on adding these as defaults. |
Author
|
@digitalBush can you please explain how to use "the hook"? |
Contributor
|
Probably like this: $.extend( $.mask, {
definitions: {
// configs here
},
placeholders: {
// Configs here
}
}); |
Owner
|
@simonschaufi I misspoke just a bit. I meant custom mask definitions. I'd like to hold off on the placeholder thing I think until I have a way to do proper date masking. The eyescript sample from the README is good example of adding definitions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a patch by germanwings i found while booking a flight ;)
It adds new placeholders for (birth)dates that can be overwritten to localize them by setting:
$.mask.placeholders['D'] = 'T';
So instead of having underlines, you can now have DD.MM.YYYY as placeholder. Very nice!
This can also be extended more to use Hour and Second for example.