views:

119

answers:

2

I have been developing a compact framework app on an emulator, and some of the forms use DateTimePickers. These work fine in the emulator, but when running on the hardware they cause the form to close when a date is selected. No exception is thrown...the form just closes unexpectedly. Has anyone experienced this or know how to fix it?

+1  A: 

On both your device and the emulator, go to:

Start | Settings [System] | Regional Settings [Date]

and see if both have the same settings for Short date, Date Separator and Long date. This is just a guess, but it's one possible difference between the emulator and the device that is at least related to date pickers. If they're different, try setting the device the same as the emulator and see if you still have the problem.

MusiGenesis
A: 

Thanks for the suggestion...but the regional settings are the same on the emulator and device.

My solution to this was to set the "ShowUpDown" property of the DateTimePicker control to true so as to disable the popup calendar and enable the user to scroll through values. This provides the same functionality without the bug, but doesn't have the visual appeal that the popup calendar does. If anyone has any other ideas for me to try let me know, otherwise this is the working solution.

Scott Anderson

related questions