3
votes

How can I configure the datepicker from https://angular-ui.github.io/bootstrap/#/datepicker to accept non-US date input without reversing the day and month.

For example, if I enter '1 2 2015' this should result in '1st February 2015' but it is interpreted as '2nd January 2015'. If I set the datepicker-popup value to

datepicker-popup="dd MMM yy"

then it will correctly accept input of '1 Feb 2015', which is close, but not good enough.

This can be demonstrated at https://angular-ui.github.io/bootstrap/#/datepicker by entering '1 2 2015' into the 'Popup' input.

1

1 Answers

0
votes

datepicker-popup="d M yyyy"

Plunker

This works for '1 2 2015' but goes back to US date if you put a 0 before a day or a month '1 02 2015'.