Skip to content

Commit

Permalink
Fix bug show 31 days and dayStart in 6 section
Browse files Browse the repository at this point in the history
  • Loading branch information
Husseinhj committed Nov 12, 2017
1 parent 9f69ca7 commit cdda8e1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ios_calendar/Sources/CalendarView.m
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,9 @@ - (void) generatePersianDayRects{

NSInteger startDayOfMonth = [currentDate getWeekdayOfFirstDayOfMonthForCalendar:calendar];
NSInteger plusRow = startDayOfMonth == 7?2:1;
if (startDayOfMonth >= 6 && lastDayOfMonth == 31) {
plusRow = 2;
}
NSInteger weeks = (lastDayOfMonth / 7)+plusRow;
NSInteger minimumDayOfWeek = 1;
if (startDayOfMonth > 0) {
Expand Down

0 comments on commit cdda8e1

Please sign in to comment.