PySimpleGUI/Demo_Calendar.py

16 lines
422 B
Python
Raw Normal View History

2018-09-27 20:24:09 +00:00
#!/usr/bin/env python
import sys
if sys.version_info[0] >= 3:
2018-09-27 20:24:09 +00:00
import PySimpleGUI as sg
else:
import PySimpleGUI27 as sg
layout = [[sg.T('Calendar Test')],
[sg.In('', size=(20,1), key='input')],
[sg.CalendarButton('Choose Date', target='input', key='date')],
[sg.Ok(key=1)]]
window = sg.Window('Calendar', grab_anywhere=False).Layout(layout)
b,v = window.Read()
2018-09-22 03:29:50 +00:00
sg.Popup(v['input'])