SwiftUI DatePicker jumps between short and medium date formats when changing the date

Looks like a bug. Here is a found workaround (tested with Xcode 13beta / iOS 15)

demo

  DatePicker(
    "Date",
    selection: $date,
    displayedComponents: .date
  )
  .labelsHidden()
  .id(date)             // << here !!

Leave a Comment