I'm facing weird situation with DateTimePicker control. I've a DateTimePicker control with short date format.
I'm setting the value of this control in the textbox in the following way:
private void dateTimePicker1_ValueChanged(object sender, EventArgs e)
{
textBox1.Text = dateTimePicker1.Value.ToShortDateString();
}
Now, when I try to change the month, which is first section in the control, if I enter two digits it fires ValueChanged event otherwise not.
Say, for example I'm trying to enter 6th month and I press 6 on keyboard, this time ValueChanged event doesn't fire. But when I press 0 and 6 then it fires that event. If I enter 11 or 12 it fires ValueChanged event. Same applies to date section as well.
In short it doesn't fire ValueChanged event when I enter single digit in Date or Month section but it fires when I enter two digits. Can anybody tell me why it is behaving this way? Is it expected behaviour of DTP?
How do I make it fire that event even when I enter single digit?