L
linuxfedora
I seem to be encountering what appears to be a bug in the
DateTimePicker Control using VS 2005. Follow these steps:
1. Create a new C# Windows Application project
2. Drop a DateTimePicker Control and a Button onto the form
3. Set the button as the form's AcceptButton
4. Add a Click handler for the button
5. Set a breakpoint inside the Click handler
6. Run the app in the debugger
7. Add a watch for the DateTimePicker Control's Value property
8. Type a single number over one of the number fields, such as the
day or year
9. Hit Enter
10. Notice inside the Click handler that the DateTimePicker
Control's Value property doesn't reflect the change
If I enter two numbers, such as '11' or '06' for the field, and then
hit Enter, I don't see the problem. Also, if the field loses focus
before I hit the Enter key, all is fine. Formally clicking the button
obviously does this and the problem is therefore not seen.
Has anyone seen this before? There's not a lot of complexity here, so
I'd tend to believe that this is a bug. Assuming it is, does anyone
know if this has been reported and is being fixed?
Thanks,
DateTimePicker Control using VS 2005. Follow these steps:
1. Create a new C# Windows Application project
2. Drop a DateTimePicker Control and a Button onto the form
3. Set the button as the form's AcceptButton
4. Add a Click handler for the button
5. Set a breakpoint inside the Click handler
6. Run the app in the debugger
7. Add a watch for the DateTimePicker Control's Value property
8. Type a single number over one of the number fields, such as the
day or year
9. Hit Enter
10. Notice inside the Click handler that the DateTimePicker
Control's Value property doesn't reflect the change
If I enter two numbers, such as '11' or '06' for the field, and then
hit Enter, I don't see the problem. Also, if the field loses focus
before I hit the Enter key, all is fine. Formally clicking the button
obviously does this and the problem is therefore not seen.
Has anyone seen this before? There's not a lot of complexity here, so
I'd tend to believe that this is a bug. Assuming it is, does anyone
know if this has been reported and is being fixed?
Thanks,