bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Masking feature for Datepicker?

Open sistemanick opened this issue 10 years ago • 11 comments
trafficstars

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.

sistemanick avatar Jul 05 '15 19:07 sistemanick

+1

atentis avatar Jul 15 '15 18:07 atentis

Is there a particular reason why one would want to mask a date that can be modified?

wesleycho avatar Jul 17 '15 16:07 wesleycho

@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. image

sistemanick avatar Jul 17 '15 19:07 sistemanick

Just wondering if you need more info from me? Did what I said make sense?

sistemanick avatar Aug 04 '15 00:08 sistemanick

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.

sistemanick avatar Aug 04 '15 00:08 sistemanick

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.

wesleycho avatar Aug 04 '15 00:08 wesleycho

OK cool. I'll see if I can help out with this one :)

sistemanick avatar Aug 04 '15 01:08 sistemanick

I would really love to see this.

+1

scott-engemann avatar Aug 09 '16 02:08 scott-engemann

Why not use ui.mask and make this compatible?

yasinkocak avatar Oct 03 '16 09:10 yasinkocak

+1

ryanhinton avatar Aug 21 '17 21:08 ryanhinton

+1

sirtastic avatar Oct 16 '17 07:10 sirtastic