I want to display multiple dates using MultiDatePicker. At this time, if the selected date exceeds 92, it is not displayed properly.
The testable code is very simple.
import SwiftUI
struct MultiDatePickerTest: View {
@State var selectedDates: Set<DateComponents> = []
var body: some View {
MultiDatePicker("sample", selection: $selectedDates)
}
}
struct MultiDatePickerTest_Previews: PreviewProvider {
static var previews: some View {
MultiDatePickerTest()
}
}
You can find out by changing the number of selectedDate when creating a MultiDatePicker as above.
Up to 92 items are displayed well. For example, 92 days from October 1 to December 31. But when I select 93 days from October 1 to January 1, 2024, it doesn't display the selected date correctly. (Changing the year is not the cause.)
I attach a video. If I select more than 93 days, it appears to display the selected date when scrolling, but you can see that it disappears immediately.
Any idea what might be the issue?
https://drive.google.com/file/d/1hf01EK3zo-UoG21MKmhIEM54-oH9Nr8A/view?usp=sharing