fixed date selection
This commit is contained in:
parent
bed151eb70
commit
3221d2df5e
3
decal
3
decal
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue