0

I'm looking for a way to use uib-datepicker and some kind of mask for the user input but the uib-mask is not suitable for work with js Date() types.

In the default uib-datepicker samples the users must enter a correct and complete date like "02/26/2016", including the '/' chars but I would like to allow users to enter just the numbers when typing.

Max Bündchen
  • 1,283
  • 17
  • 38

1 Answers1

0

If you can do it the Angular way, i would use something like this

<input type="datetime-local" id="exampleInput" name="input" ng-model="example.value"
  placeholder="yyyy-MM-ddTHH:mm:ss" min="2001-01-01T00:00:00" max="2013-12-31T00:00:00" required />

Se more here: https://docs.angularjs.org/api/ng/input/input%5Bdatetime-local%5D