CalendarView icon indicating copy to clipboard operation
CalendarView copied to clipboard

DayView selectedDate binding not updating

Open barbrick opened this issue 1 year ago • 1 comments

The selectedDate binding in DayView does not update when changed. This works fine for months but not for days making it impossible to change the selectedDate outside of the touch inputs on the days.

barbrick avatar Oct 04 '24 15:10 barbrick

yes, actually other params in DayView is not reliable. So i decide to binding these value directly to the DayView:

.dayView { date, isCurrentMonthNotReliable, selectedDateThatIWontUse, selectedRange in
            CalendarDayView(date: date, month: month, isCurrentMonth: isCurrentMonthNotReliable, selectedDate: $selectedDate, selectedRange: selectedRange)
        }

$selectedDate is my @State, not come from the CalendarConfig

I'm not sure about the root and also the day seem to be shifted 1 days onward/backward. Anyone know, please make a hints

purepure avatar May 28 '25 15:05 purepure