bootstrap
bootstrap copied to clipboard
Masking feature for Datepicker?
Is there any plan to include a masking feature for datepicker? For the life of me I can't get ui-mask to play nice with either ui-bootstrap or angularstrap's datepicker.
Or at least the option to specify alternate formats for the parser, so for example we can configure it to accept all the following formats: dd/MM/yyyy, ddMMyyyy, dd.MM.yyyy, dd.MM.yy, ddMMyy. Please refer to the altFormats option for ExtJS's DateField.
+1
Is there a particular reason why one would want to mask a date that can be modified?
@wesleycho Sorry not sure what you mean. If you allow people to key in a date (as opposed to restricting it to dropdown calendar input only) I think there needs to be a mask serving as a guide, especially when the format validation is unforgiving. Good example would be the HTML5 date input.

Just wondering if you need more info from me? Did what I said make sense?
An alternative to masking is to make the datepicker more forgiving, i.e. ability to parse more input formats, similar to ExtJS's "altFormats" feature.
This sounds like a complex feature request to implement.
I would be willing to accept a PR implementing this feature, but there are a lot of tasks that are needed to address deficiencies in the datepicker, namely the weakness in not being able to use a custom parser fully, and this request seems to make it much more difficult to accomplish that goal if implemented.
OK cool. I'll see if I can help out with this one :)
I would really love to see this.
+1
Why not use ui.mask and make this compatible?
+1
+1