DatePicker widget format

I defined an xml layout with DatePicker widgets as follows:

<DatePicker android:id="@+id/SelectDate" android:layout_marginTop="10dp" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center|center_horizontal|center_vertical"> </DatePicker> 

and it displays in mm/dd/yyyy format as shown below:

alt text

but how can I display the DatePicker widget in (dd/mm/yyyy) format, , as shown below?

alt text

+6
android
source share
6 answers

The selector accepts the date format selected by the user, which means that you do not need to format it, since the user probably likes to see the format that he used most.

I just checked the HelloDatePicker tutorial, and on my phone I have a date in the format (dd / mm / yyyy), so the collector shows the same format; in the emulator I set the date in the format mm / dd / yyyy, so the collector displays the same.

According to this answer, there is no way to set the display format.

+11
source share

follow these steps: Configure DatePicker. Android

+4
source share
+1
source share

In the original android user’s sensor, you cannot change the theme and the sequence of its selection.

To do this, you should try the date picker, because there is no choice.

view this question How do you use custom Datepicker and Timepicker skins? for custom datepicker. You will get an answer for a custom pickup component in which you can customize all themes with a theme and format sequence as well.

+1
source share

If you work with the Spanish language (dd / mm / yyyy is how you display the date in Spanish), all this concerns the configuration of your local device. DatePicker accepts a language format.

0
source share

Try changing your phone settings and select a date format

0
source share

All Articles