Angular Bootstrap: how to allow 2 different date formats

I am trying to resolve MM / dd / YYYY or M / d / YYYY .

Or this template:

  • 02/04/1998
  • 02/4/1998
  • 2/04/1998
  • 2/4/1998
+4
source share
2 answers

In the Angular UI Bootstrap datepicker documentation, the directive uses the date filter built into the Angular core ( here ).

Based on the desired formatting you want MMfor the attribute format-monthand ddfor the attribute format-day.

+1
source

, ​​ commit. //- d!.M!.yyyy. . . github-issue.

NPM (angular -ui-bootstrap) V1.0.

+5

Source: https://habr.com/ru/post/1609382/


All Articles