mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-16 11:50:47 +01: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:
commit
976d7d1943
@ -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…
x
Reference in New Issue
Block a user