Welcome Guest Search | Active Topics | Sign In | Register

Date control Options
Arul
Posted: Thursday, December 18, 2008 2:59:05 PM
Rank: Advanced Member
Groups: Member

Joined: 11/17/2008
Posts: 20
Hi

How can i clear the textbox of the calendar control .

I select the calendar control and the selected date is populated in the tex box . How do i clear the textbox by coding

Rgds
-Arul
Saed
Posted: Thursday, December 18, 2008 3:32:40 PM
Rank: Advanced Member
Groups: Member

Joined: 10/15/2008
Posts: 45
Do you mean what appears at the bottom below the Calendar, something like:

Today: 13/12/2008

If so, then simply clear the <FooterTemplate> from its content or even remove it completely as I did.

Hope this helps.

Regards,

Saed Hamdan
"Man may be destroyed but not defeated" -Hemmingway
Arul
Posted: Thursday, December 18, 2008 5:12:31 PM
Rank: Advanced Member
Groups: Member

Joined: 11/17/2008
Posts: 20
Nope..i want to clear the text box where the selected date is displayed.
When i tried datecontrol.selecteddate = "" , it errored..

eo_support
Posted: Friday, December 19, 2008 5:42:47 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
Arul wrote:
When i tried datecontrol.selecteddate = "" , it errored..


Of course it will. SelectedDate property is of DateTime type. So you must give it a DateTime value.

Set SelectedDate to DateTime.MinValue to clear the Calendar.
Arul
Posted: Friday, December 19, 2008 8:34:48 AM
Rank: Advanced Member
Groups: Member

Joined: 11/17/2008
Posts: 20
Thanks

But this also worked

cdarrivalcalendar.SelectedDateString = ""


The text box was cleared


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.