What I want is to be free to choose the date as long as I am on the dateEntry widget (even if i click on down arrow this one won't be detroyed) and destroy this last (dateEntry) if I click some where else.
The problem is tkcalender is made by multiple widgets that's why the focusOut event is set just on one of them.
from tkinter import *
from tkcalendar import DateEntry
def ok(e):
print(cal.get_date())
root = Tk()
cal = DateEntry(root, year=2010)
cal.pack(padx=10, pady=10)
cal.bind('<FocusOut>', lambda e: cal.destroy())
cal.bind('<Return>', ok) # validate with Enter
cal.focus_set()
root.mainloop()
If you run the code then you click on the arrow of the DateEntry this one is destroyed and I want this one to stay there until you click some where else in the window to be destroyed.