正如标题所说,我想将 Tkinter 中的日期格式从 m/d/y 更改为 dd/mm/yyyy
我有以下代码,但没有工作。日期的格式仍然是 2/16/2022
root = tk.Tk()
root.geometry("700x450")
#Weekly From
cal1 = DateEntry(root, width=8, year=year, month=month, day=day,
background='darkblue', foreground='white', borderwidth=2, locale = 'en_us', date_patern ='dd.mm.yyyy')
cal1.place(x=150, y=50)
#Weekly to
cal2 = DateEntry(root, width=8, year=year, month=month, day=day,
background='darkblue', foreground='white', borderwidth=2, locale = 'en_us', date_patern ='dd.mm.yyyy')
cal2.place(x=240, y=50)