vb.net - VB .net datetimepicker reporting wrong value -
ok, i'm experiencing strange behavior in datetimepicker fields in program. use short format usually, , use pair of them date range selections.
problem i'm experiencing if user using keyboard input. can tab , arrow through field normal key in date. if date part entering doesn't fill it's section of mask , press enter activate formdefault without shifting focus away portion of date, value of dtp when ok_button.click event run whatever value had in before typed change.
give specific example:
user tabs date field. default date in field today's date, 4/14/2015. type in 1, arrow day, put in 1, arrow year , type 14, press enter. reported value of dtp going 1/1/2015. had instead typed out 2015, or used arrow move date part or tab shift focus control, dtp auto update fill in rest of year.
same problem exist if had typed in 1 month , hit enter, not happen if put in 12 month.
solution can think of, , haven't yet tried implement because sounds real kludge , require me go through @ ton of forms in project, change keypress event enter shift focus ok button, , invoke formdefault.
of datetimepicker fields on forms contained within user control, if property can changed in control or tied event in control, make updating much, easier.
Comments
Post a Comment