X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9472490a672d3d8cc178852279f27664037b0bf1..e02ecf7c9a400ceba147f08e3359d19de7b8161c:/wxPython/wx/lib/calendar.py?ds=inline diff --git a/wxPython/wx/lib/calendar.py b/wxPython/wx/lib/calendar.py index 257b8c1c45..4cb46b1b3f 100644 --- a/wxPython/wx/lib/calendar.py +++ b/wxPython/wx/lib/calendar.py @@ -292,6 +292,8 @@ class CalDraw: self.cal_days.append(str(i)) i = i + 1 + self.end_pos = dow + dim + return start_pos def SetWeekEnd(self, font_color=None, backgrd = None): @@ -540,6 +542,9 @@ class CalDraw: f = wx.Font(10, self.font, wx.NORMAL, self.bold) # initial font setting self._CalcFontSize(DC, f) + if key > self.end_pos: + key = self.end_pos + val = self.cal_days[key] cnt_x = key % 7 cnt_y = int(key / 7)+1