【发布时间】:2021-08-30 19:11:51
【问题描述】:
我想从 tkcalendar 中选择日期并找出差异 在所选日期和当前日期之间。有人可以帮忙吗? (作为 尽可能简单)另外,我尝试安装了 tkcalendar,我可以 使用它,但 vscode 说 report missing import
newToProgramming无法从其他人那里弄清楚
from tkinter import *
try :
from tkcalendar import *
except:
pass
root = Tk() # Creating instance of Tk class
root.title("Centering windows")
root.resizable(False, False) # This code helps to disable windows from resizing
root.geometry("200x200+600+100")
def days():
# find the difference between the current date and the choosen date
pass
Label(root, text= 'Pick Up Date :').pack()
txt_pdate = DateEntry(root)
txt_pdate.pack()
txt_pdate.get_date()
btn = Button(root, text='click', command= days).pack()
root.mainloop()
【问题讨论】:
标签: python date tkcalendar