How to change the format of date in date picker

前端 未结 3 1982
深忆病人
深忆病人 2020-11-28 16:30

In my iPhone app, I need to display date in yyyy/MM/dd format as show in beloow image

3条回答
  •  温柔的废话
    2020-11-28 17:00

    The UIDatePicker is made to adapt to the user's settings. Changing its format using the locale: method was possible but is now deprecated in iOS 5.0.

    You can view your format in the settings of your iPhone :

    Settings > General > International > Region Format >
    

    If you want a specific format, consider making your own picker but it is very discouraged for a date picker.

    And also refer this Link

提交回复
热议问题