DatePicker Widget Format

后端 未结 4 1018
被撕碎了的回忆
被撕碎了的回忆 2020-12-10 07:45

I have defined a xml layout with the DatePicker widget as follows:

     

        
相关标签:
4条回答
  • 2020-12-10 08:01

    In android native datepicker will not allow you to change theme and sequence of picker of it at all.

    You should try custom date picker component for that because no choice for that.

    see this question How do you use custom Datepicker and Timepicker skins? for custom datepicker.You will get answer for custom picker component in that you can customize all the things with theme and sequence of format also.

    0 讨论(0)
  • 2020-12-10 08:11

    If you are working with spanish language (dd/mm/yyyy is how you show the date in spanish), it's all about your local device configuration. DatePicker takes the language format.

    0 讨论(0)
  • 2020-12-10 08:12

    Try changing phone settings and choose date format

    0 讨论(0)
  • 2020-12-10 08:19

    The picker take the date format chosen by the user, which means you don't really have to format it, as probably the user enjoyes the most to see the format he's used to.

    I've just tested the HelloDatePicker tutorial and in my phone, I have the date in (dd/mm/yyyy) format, so the picker shows the same format; in emulator, I've put the date in mm/dd/yyyy format, so the picker displays the same.

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

    0 讨论(0)
提交回复
热议问题