fixed date selection

This commit is contained in:
Yessiest 2022-01-29 13:59:38 +04:00
parent bed151eb70
commit 3221d2df5e
1 changed files with 2 additions and 1 deletions

3
decal
View File

@ -232,6 +232,7 @@ for cal in calendars:
# and now we're just generating calendar lines
cal_prints = []
selected_date = datetime.date(args['year'],args['month'],args['day'])
for year,month in ympairs((args['year'],args['month']),offset,dstart=args['3']):
# a function to colorize cells in a more or less generic way
def lambdafunc(cell):
@ -240,7 +241,7 @@ for year,month in ympairs((args['year'],args['month']),offset,dstart=args['3']):
event = events[(year,month)][day]
uid = event[0]["uid"][0].value.encode()
cell = colorize(cell,uid)
if datetime.date(year,month,day) == datetime.date.today():
if datetime.date(year,month,day) == selected_date:
cell = colorize(cell,"inverse")
return cell
cal_prints.append(gencal(year,