有没有办法让 tkcalendar 显示多个日期条目小部件?

Is there a way for tkcalendar to display more than one Date Entry widget?

我正在开发一个数据库输入应用程序,并且正在使用 Python 3.8 的 GUI 使用 tkinter 和 tkcalendar。我在下面制作了一段代码,说明了我在同一 window.

中尝试初始化两个 DateEntry 小部件时看到的错误
import tkinter as tk
import tkcalendar as tkdate

class root(tk.Tk):

    def __init__(self, *args, **kwargs):

        tk.Tk.__init__(self, *args, **kwargs)
        container = tk.Frame(self)
        container.grid(row=0, column=0)

        self.DE1 = tkdate.DateEntry(self)
        self.DE1.grid(row=1, column=0)

        self.DE2 = tkdate.DateEntry(self)
        self.DE2.grid(row=2, column=0)


app = root()
app.mainloop()

回溯似乎没有提供太多信息,但无论如何我都会将其粘贴在这里;请注意,正在创建的 DateEntry 小部件的多个实例似乎导致退出代码 1:

Traceback (most recent call last):
  File "C:/Users/pmo/.PyCharmCE2019.3/config/scratches/scratch_1.py", line 19, in <module>
    app = root()
  File "C:/Users/pmo/.PyCharmCE2019.3/config/scratches/scratch_1.py", line 15, in __init__
    self.DE2 = tkdate.DateEntry(self)
  File "C:\Users\pmo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\tkcalendar\dateentry.py", line 105, in __init__
    self._setup_style()
  File "C:\Users\pmo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\tkcalendar\dateentry.py", line 160, in _setup_style
    self.style.map('DateEntry', **maps)
  File "C:\Users\pmo\AppData\Local\Programs\Python\Python38-32\lib\tkinter\ttk.py", line 403, in map
    self.tk.call(self._name, "map", style, *_format_mapdict(kw)),
_tkinter.TclError: Invalid state name r

Process finished with exit code 1

奇怪的是,我能够毫无问题地放置两个日历小部件,但是当尝试使用两个或更多 DateEntry 小部件时,整个应用程序都会失败。我在网上查过,但没有看到其他人在使用 tkcalendar 时遇到过这个特殊问题。有没有人知道如何解释这个错误或更好,知道如何解决这个问题?

谢谢!

基于 jasonharper 的回答和 link:https://github.com/j4321/tkcalendar/issues/61

创建者在此处发布的修复似乎确实解决了使用此更新库时的问题(如果对任何人有用,我在 Windows 10,x64):https://github.com/j4321/tkcalendar/tree/fix_63

希望能推入主库!