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
|
# and now we're just generating calendar lines
|
||||||
cal_prints = []
|
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']):
|
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
|
# a function to colorize cells in a more or less generic way
|
||||||
def lambdafunc(cell):
|
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]
|
event = events[(year,month)][day]
|
||||||
uid = event[0]["uid"][0].value.encode()
|
uid = event[0]["uid"][0].value.encode()
|
||||||
cell = colorize(cell,uid)
|
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")
|
cell = colorize(cell,"inverse")
|
||||||
return cell
|
return cell
|
||||||
cal_prints.append(gencal(year,
|
cal_prints.append(gencal(year,
|
||||||
|
|
Loading…
Reference in New Issue