mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
Merge pull request #2214 from naveensingh/fix_yearly_view
Use proper day of month to calculate start index in week
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user