comparing two datetimepickers
-
I'm building a screen with windows form. I need to have a start day and end day. To solve this I'm using two dateTimePickers, one for the start and one for the end day. When people change the end date before the start date, the start date will be that from the end date. But when people change the start date to after the end date, the start date should be the end date. So the end date is like the master dtp. Now there is a problem to implement this in windows XP. The error occurs when people select the start date and press the 'month further' button. When this happens, an event goes of (value changed) and there will be a check (start date before end date), if this is false the start date is set again (event goes of again) and a messagebox is shown. But the strange thing is that directly after the first messagebox a next messagebox is shown (and the startdate is 1 month higher than before, this loops until eternity (or you close all the messageboxes with pushing enter). In Windows Vista this won't occur. I guess that the event (month-further-clicked) is remembered by the computer and therefore occur everytime. But what is the workaround for this strange bug?