How to check that an operator correctly enters a date?
I'm blocking on how to give a true value if a correct date Thank you in advance for your help
from tkinter import *
from tkinter.messagebox import * # boîte de dialogue
def Verification():
if date_saisie.get() == 'python27':
showinfo('Résultat','good date by !')
Mafenetre.destroy()
else:
showwarning('incorrect date. Please start over !')
date_saisie.set('')
Mafenetre = Tk()
Mafenetre.title('Frame widget')
Mafenetre['bg']='bisque' # couleur de fond
Frame2 = Frame(Mafenetre,borderwidth=2,relief=GROOVE)
Frame2.pack(side=LEFT,padx=10,pady=10)
Label(Frame2,text="saisir une date \nEX:01/01/2020").pack(padx=10,pady=5)
date_saisie= StringVar()
date_saisie.set("01/01/2020")
Champ = Entry(Frame2, textvariable= date_saisie, bg ='bisque', fg='maroon')
Champ.focus_set()
Champ.pack(side = LEFT, padx = 10, pady = 5)
Bouton = Button(Mafenetre, text ='Valider', command = Verification)
Bouton.pack(side = LEFT, padx = 10, pady = 10)
Mafenetre.mainloop()