Skip to content

calendar.parse_date returns subclass.get() #96

@AceScottie

Description

@AceScottie

If you create a subclass of DateEntry then calendar.parse_date uses subclass.get() rather than super().get().

example: (remove the # in the get(self) function to see the error in parse_date)
Error occurs when configuring the DateEntry in any way.

import tkinter as tk
from tkcalendar import DateEntry

class overDateEntry(DateEntry):
	def __init__(self, master, **kwargs):
		super(overDateEntry, self).__init__(master)
		self.strvar = tk.StringVar()
		kwargs['textvariable'] = self.strvar
		self.configure(**kwargs)
	def get(self):
		return self.strvar.get()#, True

	def getty(self):
		return self.strvar.get(), True


root = tk.Tk()
de = overDateEntry(root)
de.pack(side=tk.TOP)
root.mainloop()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions