Setting up angular-ui bootstrap datepicker to accept UK data input (dd MM yyyy)

How to set up datepicker from https://angular-ui.github.io/bootstrap/#/datepicker to accept non-US input without changing day and month.

For example, if I enter "1 2 2015" it should result in "February 1, 2015", but it will be interpreted as "January 2, 2015". If I set the datepicker-popup to

datepicker-popup="dd MMM yy"

      

then it will correctly accept "Feb 1, 2015" input that is close but not good enough.

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

+3


source to share


1 answer


datepicker-popup="d M yyyy"

Plunker



This works for "1 2 2015", but falls back to the US date if you put 0 before the day or month "1 02 2015".

0


source







All Articles