This commit is contained in:
yumoqing 2021-01-31 18:28:03 +08:00
parent d5bbcfc630
commit 743c6290f0

View File

@ -324,7 +324,7 @@ class MDDatePicker(FloatLayout, ThemableBehavior, RectangularElevationBehavior,
self.cal_list = cal_list
def change_month(self, operation):
op = 1 if operation is 'next' else -1
op = 1 if operation == 'next' else -1
sl, sy = self.month, self.year
m = 12 if sl + op == 0 else 1 if sl + op == 13 else sl + op
y = sy - 1 if sl + op == 0 else sy + 1 if sl + op == 13 else sy