from datetime import date
import tkinter as tk
from tkcalendar import Calendar
from time_interface import timeinterface


root = tk.Tk()

def select_date():
    # current date
    current_date = date.today()
    # date selcted from calendar
    selected_date = cal.get_date()
    sel_date_array = selected_date.split('-')
    selected_date = date(int(sel_date_array[0]), int(sel_date_array[1]), int(sel_date_array[2]))

    if(selected_date > current_date):
        # display the time interface
        timeinterface(current_date, selected_date)

        # close the current window
        exit()
    else:
        error_label.config(text="Selected Date must not be Previous days or the current date")

root.iconbitmap('clock.ico')
root.title("Time Count down")
root.geometry('500x500')

# show the calendar
date_select_label = tk.Label(root, text="Select final Date")
date_select_label.pack(pady=20)
cal = Calendar(root, selectmode="day", date_pattern='yyyy-mm-dd')
cal.pack(pady=20)

tk_button = tk.Button(text="Select Date", command=select_date)
tk_button.pack(pady=20)

error_label = tk.Label(root, text="", fg="red")
error_label.pack(pady=20)

# enter widgets here
root.mainloop()
9cb18973a7629051089d4cfb6f6a754a99622c99
<mask token>


def select_date():
    current_date = date.today()
    selected_date = cal.get_date()
    sel_date_array = selected_date.split('-')
    selected_date = date(int(sel_date_array[0]), int(sel_date_array[1]),
        int(sel_date_array[2]))
    if selected_date > current_date:
        timeinterface(current_date, selected_date)
        exit()
    else:
        error_label.config(text=
            'Selected Date must not be Previous days or the current date')


<mask token>

<mask token>


def select_date():
    current_date = date.today()
    selected_date = cal.get_date()
    sel_date_array = selected_date.split('-')
    selected_date = date(int(sel_date_array[0]), int(sel_date_array[1]),
        int(sel_date_array[2]))
    if selected_date > current_date:
        timeinterface(current_date, selected_date)
        exit()
    else:
        error_label.config(text=
            'Selected Date must not be Previous days or the current date')


root.iconbitmap('clock.ico')
root.title('Time Count down')
root.geometry('500x500')
<mask token>
date_select_label.pack(pady=20)
<mask token>
cal.pack(pady=20)
<mask token>
tk_button.pack(pady=20)
<mask token>
error_label.pack(pady=20)
root.mainloop()

<mask token>
root = tk.Tk()


def select_date():
    current_date = date.today()
    selected_date = cal.get_date()
    sel_date_array = selected_date.split('-')
    selected_date = date(int(sel_date_array[0]), int(sel_date_array[1]),
        int(sel_date_array[2]))
    if selected_date > current_date:
        timeinterface(current_date, selected_date)
        exit()
    else:
        error_label.config(text=
            'Selected Date must not be Previous days or the current date')


root.iconbitmap('clock.ico')
root.title('Time Count down')
root.geometry('500x500')
date_select_label = tk.Label(root, text='Select final Date')
date_select_label.pack(pady=20)
cal = Calendar(root, selectmode='day', date_pattern='yyyy-mm-dd')
cal.pack(pady=20)
tk_button = tk.Button(text='Select Date', command=select_date)
tk_button.pack(pady=20)
error_label = tk.Label(root, text='', fg='red')
error_label.pack(pady=20)
root.mainloop()

from datetime import date
import tkinter as tk
from tkcalendar import Calendar
from time_interface import timeinterface
root = tk.Tk()


def select_date():
    current_date = date.today()
    selected_date = cal.get_date()
    sel_date_array = selected_date.split('-')
    selected_date = date(int(sel_date_array[0]), int(sel_date_array[1]),
        int(sel_date_array[2]))
    if selected_date > current_date:
        timeinterface(current_date, selected_date)
        exit()
    else:
        error_label.config(text=
            'Selected Date must not be Previous days or the current date')


root.iconbitmap('clock.ico')
root.title('Time Count down')
root.geometry('500x500')
date_select_label = tk.Label(root, text='Select final Date')
date_select_label.pack(pady=20)
cal = Calendar(root, selectmode='day', date_pattern='yyyy-mm-dd')
cal.pack(pady=20)
tk_button = tk.Button(text='Select Date', command=select_date)
tk_button.pack(pady=20)
error_label = tk.Label(root, text='', fg='red')
error_label.pack(pady=20)
root.mainloop()

from datetime import date
import tkinter as tk
from tkcalendar import Calendar
from time_interface import timeinterface


root = tk.Tk()

def select_date():
    # current date
    current_date = date.today()
    # date selcted from calendar
    selected_date = cal.get_date()
    sel_date_array = selected_date.split('-')
    selected_date = date(int(sel_date_array[0]), int(sel_date_array[1]), int(sel_date_array[2]))

    if(selected_date > current_date):
        # display the time interface
        timeinterface(current_date, selected_date)

        # close the current window
        exit()
    else:
        error_label.config(text="Selected Date must not be Previous days or the current date")

root.iconbitmap('clock.ico')
root.title("Time Count down")
root.geometry('500x500')

# show the calendar
date_select_label = tk.Label(root, text="Select final Date")
date_select_label.pack(pady=20)
cal = Calendar(root, selectmode="day", date_pattern='yyyy-mm-dd')
cal.pack(pady=20)

tk_button = tk.Button(text="Select Date", command=select_date)
tk_button.pack(pady=20)

error_label = tk.Label(root, text="", fg="red")
error_label.pack(pady=20)

# enter widgets here
root.mainloop()