Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
if start, end date was same, would raise error
  • Loading branch information
AyushCodez committed Feb 20, 2022
1 parent 3754f70 commit 1d0502f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ def switch_tab2(*args):
date1 = datetime.strptime(
cal_tab2.get_date() + f' {a}:{b}:00', '%Y-%m-%d %H:%M:%S')
date2 = datetime.strptime(
cal1_tab2.get_date() + f' {a1}:{b1}:59', '%Y-%m-%d %H:%M:%S')
if date1 > date2:
cal1_tab2.get_date() + f' {a1}:{b1}:00', '%Y-%m-%d %H:%M:%S')
if date1 >= date2:
button2.config(state='disabled')
else:
button2.config(state='normal')
Expand Down Expand Up @@ -363,8 +363,8 @@ def switch(*args):
date1 = datetime.strptime(
cal_var.get() + f' {a}:{b}:00', '%Y-%m-%d %H:%M:%S')
date2 = datetime.strptime(
cal1.get_date() + f' {a1}:{b1}:59', '%Y-%m-%d %H:%M:%S')
if date1 > date2:
cal1.get_date() + f' {a1}:{b1}:00', '%Y-%m-%d %H:%M:%S')
if date1 >= date2:
button1.config(state='disabled')
else:
button1.config(state='normal')
Expand Down

0 comments on commit 1d0502f

Please sign in to comment.