Open
Description
tkcalendar which is a famous calendar written with tkinter breaks when u apply the sun valley theme the most notable and important thing it changes is it sets the current_date_selected to the same color which obviously ruins the whole point of the calendar , here is the example code below
import tkinter as tk
from tkcalendar import Calendar
import sv_ttk
root = tk.Tk()
root.title("Calendar Example")
cal = Calendar(root, selectmode="day", date_pattern="yyyy-mm-dd")
cal.pack(padx=10, pady=10)
sv_ttk.set_theme('Dark')
root.mainloop()
the output I get is this
and if you remove the theme the output is
As you can see the the date of 10 is highlighted because that's the current date selected
tkcalendar does provide a way to change the selectedbackground which I tried after settings the sun valley theme thinking it might override the theme but that doesn't seem to work either
the code is here
import tkinter as tk
from tkcalendar import Calendar
import sv_ttk
root = tk.Tk()
root.title("Calendar Example")
cal = Calendar(root, selectmode="day", date_pattern="yyyy-mm-dd")
cal.pack(padx=10, pady=10)
sv_ttk.set_theme('Dark')
cal.config(selectbackground="blue")
root.mainloop()
Metadata
Metadata
Assignees
Labels
No labels
Activity