'Simple drop-down calendar + date picker in Python

Trying to create a simple drop-down calendar with a date picker in Python such that a field drops down to show a calendar where after a date is selected is captured - I have not yet come across a clean, simple and short code for Python 3.6.1. Therefore, need help with creating a simple drop down date picker in Python.

EDIT : I was not able to access Calendar, DateEntry widgets from the package tkcalendar earlier and therefore created a class to render the same using the answer below.



Solution 1:[1]

first pip install tkcalendar then

import tkinter as tk

from tkcalendar import DateEntry
root = tk.Tk()
cal = DateEntry(root, width=12, year=2019, month=6, day=22, 
background='darkblue', foreground='white', borderwidth=2)
cal.pack(padx=10, pady=10)
root.mainloop()

Solution 2:[2]

First:

pip install panel

Second:

import panel as pn
pn.extension()

pn.widgets.DatePicker(name='Set Starting Date')

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 clozano