2018-09-27 20:24:09 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
import sys
|
2018-09-28 18:57:37 +00:00
|
|
|
if sys.version_info[0] >= 3:
|
2018-09-27 20:24:09 +00:00
|
|
|
import PySimpleGUI as sg
|
2018-09-28 18:57:37 +00:00
|
|
|
else:
|
|
|
|
import PySimpleGUI27 as sg
|
2018-09-05 13:04:17 +00:00
|
|
|
|
|
|
|
layout = [[sg.T('Calendar Test')],
|
2018-09-22 02:45:05 +00:00
|
|
|
[sg.In('', size=(20,1), key='input')],
|
|
|
|
[sg.CalendarButton('Choose Date', target='input', key='date')],
|
2018-09-05 13:04:17 +00:00
|
|
|
[sg.Ok(key=1)]]
|
|
|
|
|
2018-09-24 22:01:00 +00:00
|
|
|
window = sg.Window('Calendar', grab_anywhere=False).Layout(layout)
|
2018-10-15 20:07:23 +00:00
|
|
|
event,values = window.Read()
|
|
|
|
sg.Popup(values['input'])
|