DateEntry class in tkcalendar bug in runtime

120 views Asked by At

During runtime, the DateEntry class exhibits some odd behavior. When clicking the dropdown, I'm presented with the following bug - calendar details not displaying. If I double click the dropdown, the bug resolves, but the formatting is very strange and hard for a user to read (white text on white background). Am I doing something wrong here? If not, does anyone know a workaround for this issue?

enter image description here

enter image description here

window = tkinter.Tk()
window.title("Billables Entry Form")

frame = tkinter.Frame(window)
frame.pack(padx=20, pady=10)


date_label = tkinter.Label(frame, text="Date")
date_label.grid(row=0, column=0)

date_entry = DateEntry(frame, selectmode='day', year=currentYear, month=currentMonth, day=1)

date_entry.grid(row=1, column=0)

window.mainloop()
1

There are 1 answers

0
drchicken On BEST ANSWER

Unfortunately, this is a known issue on macOS; see this GitHub issue. You can try adding this line before your mainloop but that appears to only work on old versions.

date_entry._top_cal.overrideredirect(False)

If you have a GitHub account, you can comment on the issue to raise its importance.