Is there an easy way to return the user selected date value to another python script using this code for a python calendar widget? I've saved the calendar widget in its own file named CalendarWidget.py. I have a main gui with a button that opens the calendar widget.
def callback():
t=tk.Toplevel()
t.title("Calendar")
cal = CalendarWidget.Calendar(t, firstweekday=calendar.SUNDAY)
cal.pack(expand=1, fill="both")
cal.selection
This is working fine. Now I just want to utilize the date. With the instance of cal.selection, I have tried saving the date. However, I am finding the cal.selection line is interpreted before the actual selection is saved. Thus I get a value of None for the calendar widget date.
Thanks for your consideration.