Buda Gavril
Buda Gavril

Reputation: 21647

android DatePickerDialog switch place between day and month

I have to show a DatePickerDialog dialog and I need to show day, month and year, but on my phone month appears before day. Is there a way to switch places between month and day?

Upvotes: 4

Views: 2028

Answers (2)

woodshy
woodshy

Reputation: 4111

Actually you can't set the order of pickers in DatePickerDialog according to programmatically set format, because DatePicker which is used in DatePickerDialog takes no fotmat as parameter, but retrieves it from system.

The only things you could do are: 1) create your own dialog 2) set system datetime format when app starts (and maybe restore when application closes)

android.app.DatePickerDialog src

Upvotes: 1

Dimse
Dimse

Reputation: 1506

In settings under Date and time there is an option to change the date format. This should change the DatePickerDialog layout. I have not tested this myself, so please confirm if that is the case.

Upvotes: 1

Related Questions