Reputation: 1157
I am trying to allow MM/dd/YYYY or M/d/YYYY.
Or this pattern:
02/04/1998
02/4/1998
2/04/1998
2/4/1998
Upvotes: 5
Views: 1925
Reputation: 2430
Seems that the issue has been fixed with this commit. You can now define a day/month/year-date in format d!.M!.yyyy
. It allows an optional leading zero for day and month. See this github-issue for more information.
Available as NPM (angular-ui-bootstrap) from V1.0.
Upvotes: 7
Reputation: 4643
Per the Angular UI Bootstrap datepicker documentation, the directive uses the date filter built into angular core (documentation here).
Based on the formatting you desire, you want MM
for format-month
attribute and dd
for the format-day
attribute.
Upvotes: 1