修复折叠周视图跨月日期未置灰的问题
WeekPager 之前把 isCurrentMonth 硬编码成 true,导致折叠状态下 当前周里属于上/下个月的日期没有变灰,与展开月视图的灰显约定不 一致。改为按 selectedDate 的年月判定(与 MonthHeader 显示的 月份一致),保持折叠前后的视觉一致性。
This commit is contained in:
parent
b730edc1eb
commit
889a54db0e
@ -78,7 +78,8 @@ fun WeekPager(
|
||||
val date = weekMonday.plus(DatePeriod(days = dayOffset))
|
||||
DayCell(
|
||||
date = date,
|
||||
isCurrentMonth = true,
|
||||
isCurrentMonth = date.month == selectedDate.month
|
||||
&& date.year == selectedDate.year,
|
||||
isSelected = date == selectedDate,
|
||||
isToday = date == today,
|
||||
onClick = { onDateClick(date) },
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user