Welcome Guest Search | Active Topics | Sign In | Register

Datepicker with callback panel Options
Peter Smith
Posted: Monday, July 21, 2008 1:39:02 PM
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

eo_support
Posted: Monday, July 21, 2008 2:42:56 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,097
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!
Peter Smith
Posted: Tuesday, July 22, 2008 9:17:37 AM
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
eo_support
Posted: Tuesday, July 22, 2008 9:24:49 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,097
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


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.