Python Forum
[Tkinter] Retrieving a value from a calendar with a single click
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Retrieving a value from a calendar with a single click
#4
when you created the entry widget you added a function call to result_selected and you
get an error. Entries don't call function that's where the bind key name the function
used. so first of change your entry like so:
entry_date = Entry(root)
then when you click on the entry it will call the calendar function calendar1.
you can use print instead of return
def calendar1(event):
    def result_select():
        print(cal.selection_get())# ...rest of your function
do a search of tkcalendar they made a document pdf with examples and attributes etc.
Reply


Messages In This Thread
RE: Retrieving a value from a calendar with a single click - by joe_momma - Jan-23-2020, 08:29 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to set the calendar widget to current date scratchmyhead 4 7,245 May-11-2020, 08:27 PM
Last Post: scratchmyhead
  Tkinter calendar widget scratchmyhead 4 4,410 May-03-2020, 07:01 PM
Last Post: scratchmyhead

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020