Reading time: 1 min

This quick recipe shows how to set custom locale, calendar and time zone on a SwiftUI DatePicker and MultiDatePicker. The end result looks like this:

Screenshot%202022-08-05%20at%2018.06.13Screenshot%202022-08-05%20at%2018.06.43

To do this, use different environment modifiers on your DatePicker or MultiDatePicker:

  • \.locale to set a custom locale.
  • \.calendar...

Continue Reading...