Click here to Skip to main content
15,886,595 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
By using following code dates are not what I have entered they are todays date and this problem is not getting corrected. I mean what to add or edit in the code below to make them the dates I have entered in the tkinter form which can be any not only todays date. The tkinter form then input these dates in an excel sheet.



p_issue = Label(top, text='ISSUE DATE', font=('bold', 10))
p_issue.place(relx=0.1, rely=0.61, anchor=W) 
global e_pissue 
e_pissue = Entry(top) 
e_pissue.place(relx=0.5, rely=0.61, anchor=E) 
cal1 = DateEntry(e_pissue, width=12, borderwidth=1) 
cal1.pack() 
e_pissue.config(width=30) 
e_pissue.insert(END, cal1.get())


What I have tried:

reading books and tutorials on tkinter but do not find anything....
Posted
Updated 21-Nov-21 22:09pm

1 solution

According to the documentation at Calendar — tkcalendar 1.5.0 documentation[^] there is no get method. You need to check what is returned at that point.
 
Share this answer
 
Comments
A. B. Dinshaa 22-Nov-21 4:16am    
besides get() I tried get_date(), selection_get(), selection_own_get() by seeing from tkcalendar's DateEntry function's documentation nothing worked. how to check what is returned at that point and what and where is the point?
Richard MacCutchan 22-Nov-21 4:22am    
What actual values are you getting from the calendar versus what you are selecting?
A. B. Dinshaa 22-Nov-21 4:54am    
Getting only todays date and I am selecting other dates which can be any other than todays date
Richard MacCutchan 22-Nov-21 6:53am    
Sorry, but it is impossible to guess what may be wrong. You will need to use the debugger to gather more information.
Richard MacCutchan 22-Nov-21 10:05am    
I have tried this myself, using the examples provided but get the same result as you. I suggest you raise the issue with the owner of this library.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900