I have a page in my WP7 app that allows the user to add or edit a date. I use the DatePicker control from the WP7 Toolkit referenced here : http://windowsphonegeek.com/articles/wp7-datepicker-and-timepicker-in-depth--api-and-customization
. When I add a date everything works fine and the date is added successfully.
The problem comes when I try to edit that date.
The process that I use is as follows:
When the page loads, I look for an edit value sent to it. IF the edit value is sent, then I set the DatePicker to the original date which I look up in the underlying class:
datePicker1.value = originalDate
The DatePicker control gets the correct value and displays it. When I select the field again the full screen selection choice shows up, and I can edit the date. However when I click 'Save' and it reloads the screen that the control is on, the control is set back to the original date -- not the modified date.
I am using the same process to change other fields -- names, addresses, etc. and don't have any problems with them. Only the Datepicker control is causing a problem