Fix out-of-range bug

A change introduced late in the time/date widgets patch introduced
a regression in input handling.  This reverts that change.