robbdimitrov/RDVCalendarView — pull request #11 by alexeyismirnov (2014-10-11 09:30:39+00:00)
Title: Refactored showPreviousMonth() and showNextMonth to keep self.month cons...

Variable self.month is a public property in class RDVCalendarView. This means that it can be used by external classes, and, therefore, it should be always consistent. The field self.month.year represents year currently shown inside calendar. The problem is that functions showPrevMonth() and showNextMonth() don't update this field. They only update self.month.month. Thus, when I try to access self. month.year from my application, I get inconsistent results if the calendar is scrolled beyond current year.

I understand that I could possibly analyse self.month.month and detect an overflow, but my point is that it's the responsibility of component to keep its public variables consistent.

Thus, I suggest a patch that fixes the problem by recomputing self.month in these functions.