Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Espanso popup date selector
- - trigger: :ddate
- replace: '{{output}}'
- vars:
- - name: output
- type: script
- params:
- args:
- - python
- - -c
- - |
- from tkinter import Tk,Button
- from tkcalendar import DateEntry
- def get_date():
- selected_date = cal.get()
- print(f"Selected date: {selected_date}")
- root.destroy()
- root = Tk()
- cal = DateEntry(root, date_pattern="yyyy-mm-dd")
- cal.pack()
- btn = Button(root, text="Click Here To Return a Date ", command=get_date)
- btn.pack()
- root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement