Use proper day of month to calculate start index in week
Broke during view-binding migration
This commit is contained in:
parent
d2e59c2c66
commit
3876952f44
1 changed files with 2 additions and 1 deletions
|
@ -104,7 +104,8 @@ class YearFragment : Fragment(), YearlyCalendar {
|
|||
}
|
||||
|
||||
monthHolder.monthLabel.setTextColor(curTextColor)
|
||||
monthView.firstDay = requireContext().getProperDayIndexInWeek(dateTime.withMonthOfYear(monthOfYear))
|
||||
val firstDayOfMonth = dateTime.withMonthOfYear(monthOfYear).withDayOfMonth(1)
|
||||
monthView.firstDay = requireContext().getProperDayIndexInWeek(firstDayOfMonth)
|
||||
val numberOfDays = dateTime.withMonthOfYear(monthOfYear).dayOfMonth().maximumValue
|
||||
monthView.setDays(numberOfDays)
|
||||
monthView.setOnClickListener {
|
||||
|
|
Loading…
Reference in a new issue