I have a wx.calendar.calendarCtrl, and I wanted to use the native calendar (on Win7, eventually other platforms). This is using Python 2.7 and wx2.8.12 (or probably 2.9.x also is the same, but I don’t know).
I feel that the best UX for selecting a date is to present the calendar and the user than single clicks on the date s/he wants. To do this, I am binding the wx.calendar.EVT_CALENDAR_DAY event, and when that event fires the calendar is dismissed and the selected date is gotten and it is used in the program. Really good UX so far…
However, there’s a problem. Since the calendar comes up with the current date already selected, there is no way to select the current date with this approach, because the EVT_CALENDAR_DAY event only fires when the day is changed.
Is there any way to catch an event off the native calendar such that if the user clicks immediately on the (already selected today’s date) it fires something that can be caught an interpreted as “Ok, the user wants to set the date back to today’s date.”?
Whoops, ignore the below. Of course, I realized after I sent it that I can just call .SetDate() with the date that the user previously changed the date to (as opposed to today’s date by the system clock) before displaying the calendar. I haven’t tried it yet, but it has to work. Sorry for the noise.
I have a wx.calendar.calendarCtrl, and I wanted to use the native calendar (on Win7, eventually other platforms). This is using Python 2.7 and wx2.8.12 (or probably 2.9.x also is the same, but I don’t know).
I feel that the best UX for selecting a date is to present the calendar and the user than single clicks on the date s/he wants. To do this, I am binding the wx.calendar.EVT_CALENDAR_DAY event, and when that event fires the calendar is dismissed and the selected date is gotten and it is used in the program. Really good UX so far…
However, there’s a problem. Since the calendar comes up with the current date already selected, there is no way to select the current date with this approach, because the EVT_CALENDAR_DAY event only fires when the day is changed.
Is there any way to catch an event off the native calendar such that if the user clicks immediately on the (already selected today’s date) it fires something that can be caught an interpreted as “Ok, the user wants to set the date back to today’s date.”?