Forum Archive

UI datepicker problem

KevinKarney

I have a UI datepicker object which shows today's date on starting the dialog. If it has been moved to a different date, can I reset it (with a button) back to today's date. Whatever I try, I get '_ui.View object does not support item reassignment'

Does anyone know a way to set this picker back to its initial state???

Any help greatly appreciated - I am struggling a bit

Kevin

JonB

What did you try? This works for me:

>>> d=ui.UIDatePicker
>>> d.date=datetime.datetime(2015,9,2,4,4,4)
>>> d.date
datetime.datetime(2015, 9, 2, 4, 4, 4)