|
Rank: Newbie Groups: Member
Joined: 2/20/2008 Posts: 5
|
I am using a callback panel which optionally contains a calendar control. The default for the calendar control is no date selected and a hint string. As part of the call back, if the calendar control exists I want to reset it to no date selected with the hint string; however, now matter what I do, any selected value is retained across the callback rather than being cleared.
I am clearing the controls, creating a new datepicker control and have each tried the following
ctlDatePicker1.SelectedDate = Date.MinValue ctlDatePicker1.SelectedDate = Nothing ctlDatePicker1.VisibleDate = Date.MinValue ctlDatePicker1.VisibleDate = Nothing
as well as not setting any value before adding it to the panel.
What should I do to create any empty value
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Hi,
ctlDatePicker1.SelectedDate = Date.MinValue
Is the correct code. We verified that with the latest version and it works fine. This should have nothing to do with CallbackPanel, so you may want to try it on a blank page without the CallbackPanel first.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 2/20/2008 Posts: 5
|
Thanks for that.
The problem is that the first time I display it it is fine (shows the 'null' value). However, after a call back to recreate the calendar, although I set the new instance to null, the calandar on return shows the date it was before the call back.
Hope that makes sense.
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Hi Peter,
Would you be able to create a sample page that demonstrates the problem? We will look into it as soon as we have that. Without being able to see the problem, we are kind of like shooting in the dark and I am not sure whether that will lead to anything.
Thanks
|
|