lvollmer
lvollmer

Reputation: 1608

SwiftUI Mac OS DatePicker jumps back to day on edit

I am using a DatePicker in SwiftUI on MacOS. Whenever I make a changes to the month or year, the date picker selection jumps back to the day. That is quiet annoying when you change the month, it will jump back to the day.

That is the code I am using for the DatePicker:

DatePicker(
  selection: $s_selectedDate,
  displayedComponents: .date,
  label: { EmptyView() }
).padding(.horizontal, 20)

I have recorded a video to demonstrate the issue: enter image description here Issue in the Video: When I am typing 4 in the month, it jumps instant back to the day Is that an issue I am able to solve or is it intentionally? Apple is not using that Picker in contact books. Not sure where to find it though.

Thanks in advance.

Upvotes: 2

Views: 917

Answers (1)

davidev
davidev

Reputation: 8537

This has been fixed now in Xcode 11.4. Furthermore, they have added the graphical calendar by default.

enter image description here

Upvotes: 0

Related Questions