Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#108 calendar broken with tcl 8.5 (all months show 31 days)

open
Chad Smith
None
5
2008-10-15
2008-10-01
Mark Alston
No

Due to the changes in the clock command in tcl 8.5 the calendar widget now gives every month 31 days.

The fix is to change iwidgets::Calendar::_layout with the following:

Find the foreach lastday section and replace it with:

foreach lastday {31 30 29 28} {
if {[catch {clock scan "$month/$lastday/$year"} newdate] == 0} {
set datestring [clock format $newdate -format "%m/%d/%Y"]
set splist [split $datestring "/"]
if { [lindex $splist 0] == $month } {
break
}
}
}

Thanks,
Mark Alston

Discussion

    • assigned_to: nobody --> smithc