DateTimePicker value changes while 'browsing' dates
Posted on 2010-03-24
i have a windows form application that uses a datetime picker to select a date. I use the valuechanged event to see wether another date is selected > that fires a long and complex procedure that sets up the screen with data for that date...
now here's my problem:
because it takes some time to 'load' another date, i want to do that only when a user has selected a date. The valuechanged event fires also when you click on the arrowbuttons to move up or down a month.
to make it even more clear this example:
- the control has value 2010-03-24
- user wants it to have value 2009-09-01
- user clicks 6 times on the 'move down month' button
- user clicks on day1.
my 'load screen' procedure gets fired 7 times, but i want it to fire only when the user deliberately selects a final date.
i tried several events, including the leave, mouseup, validated, textchanged events, but didn't manage to achieve the goal.
of course i know that i can place a 'GO' button besides the control, but i don't want that...
Thanks for any help!