c# - Breaking the DateTimePicker by typing in wrong dates -
i'm using datetimepicker customformat (yyyy / mm) , showupdown set true.
after few attempts @ typing in dates , clicking on down datetimepicker threw indexoutofrange exception.
so far haven't been able reproduce willingly, typing numbers 1-0 line , ß , ´ in fast progression while being in month part happened few times again (but not every time when did this).
as both events
- valuechanging
- validating
would trigger late (validating if leave field don't during typing, , valuechanging gets datetime variable e.newvalue) i'm not sure how approach problem, or if approachable @ all. question here is: there way tackle problem?
check datetimepicker's mindate , maxdate properties. datetimepicker won't let set date isn't between mindate , maxdate.
maybe help!
Comments
Post a Comment