python tkcalendar.DateEntry setting mindate and maxdate make whole months unavailable

22 Views Asked by At

Python 3.9 application. tkcalendar v1.6.1 .The user specifies a year and then sets up events during that year. Having accepted the year, I set mindate to "1/1/YYYY" and maxdate to "31/12/YYYY" where YYYY is the selected year for two tkcalendar.DateEntry widgets. Then I set the current date to mindate in each case.

When I open the DateEntry calendars (click), they open in January with the current date showing as 1/1/YYYY as expected.

When I try to select a different date in January, nothing happens. I can select the 1st and that is accepted. If I move the month to February all dates are accepted. This is also the case for months through to November. If I move the month to December only the 31st is accepted. Trying to select another date in December is ignored.

Workaround: If I set mindate to the last day of the previous year and maxdate to the first day of the following year, all dates within the year are accepted. mindate and maxdate are also accepted but this is not a major issue.

0

There are 0 best solutions below