I have a Tcl/Tk 9 application which has a form with a widget::dateentry.
When I have a date of 12/11/2025 (with format %d/%m/%Y) and click it
the widget::calendar pops up as expected showing November 2025.
If I then click the small right arrow (advance one month) it correctly
shows me December 2025.
If I then click the small right arrow a second time I get this error:
unable to convert input string: invalid month
unable to convert input string: invalid month
while executing
"clock scan "[incr month]/1/$year 1 day ago""
(procedure "::widget::calendar::Snit_methodnumberofdays" line 8)
invoked from within
"$self numberofdays $data(month) $data(year)"
(procedure "::widget::calendar::Snit_methodadjust" line 44)
invoked from within
".mf.mpw.lpw.iw#9.titlebar.date.__drop.calendar adjust 0 1 0"
("uplevel" body line 1)
invoked from within
"uplevel 1 [linsert $args 0 $self]"
invoked from within
"::snit::RT.CallInstance ::widget::calendar::Snit_inst10 adjust 0 1 0"
(command bound to event)
I am using tklib-0.9.
On Wed, 5 Nov 2025 12:39:43 -0000 (UTC)
Mark Summerfield <m.n.summerfield@gmail.com> wrote:
I have a Tcl/Tk 9 application which has a form with a widget::dateentry.
When I have a date of 12/11/2025 (with format %d/%m/%Y) and click it
the widget::calendar pops up as expected showing November 2025.
If I then click the small right arrow (advance one month) it correctly
shows me December 2025.
If I then click the small right arrow a second time I get this error:
unable to convert input string: invalid month
unable to convert input string: invalid month
while executing
"clock scan "[incr month]/1/$year 1 day ago""
(procedure "::widget::calendar::Snit_methodnumberofdays" line 8)
invoked from within
"$self numberofdays $data(month) $data(year)"
(procedure "::widget::calendar::Snit_methodadjust" line 44)
invoked from within
".mf.mpw.lpw.iw#9.titlebar.date.__drop.calendar adjust 0 1 0"
("uplevel" body line 1)
invoked from within
"uplevel 1 [linsert $args 0 $self]"
invoked from within
"::snit::RT.CallInstance ::widget::calendar::Snit_inst10 adjust 0 1 0"
(command bound to event)
I am using tklib-0.9.
The problem is the validating nature (by default) of the [clock scan]
command in Tcl 9.
See tklib's ticket https://core.tcl-lang.org/tklib/tktview/c800a75eb5
| Sysop: | DaiTengu |
|---|---|
| Location: | Appleton, WI |
| Users: | 1,089 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 153:53:43 |
| Calls: | 13,921 |
| Calls today: | 2 |
| Files: | 187,021 |
| D/L today: |
3,760 files (944M bytes) |
| Messages: | 2,457,163 |