Welcome Guest Search | Active Topics | Sign In | Register

Problem with DatePicker Options
Menon
Posted: Friday, September 28, 2007 4:18:01 AM
Rank: Advanced Member
Groups: Member

Joined: 8/9/2007
Posts: 59
Hi There,

I am facing problem with Datepicker.

I want to use the DatePicker inside the GridView. I tried

<EditItemTemplate>
<eo:DatePicker ID="To1DatePicker" runat="server" Text='<%# Eval("DateTo1") %>'>
</eo:DatePicker>
</EditItemTemplate>

tried..

VisibleDate = '<%# Eval("DateTo1") %>' OR
SelectedDates ='<%# Eval("DateTo1") %>'

None worked....when i Use Text at that time, it doesnt throw error. But then the Datepicker doesnt display the Date and if i click the button to select the Date the Image of Calender is not clear.

When i Use VisibleDate or SelectedDates it throws Error cannot convert.

Can you please help me out. How am I supposed to Display the Date in DatePicker inside Edit Template of GridView.

Thanks in Advance.

Cheers
Menon
eo_support
Posted: Friday, September 28, 2007 5:31:49 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi Menon,

You need to use SelectedDateString property.

Thanks
Menon
Posted: Friday, September 28, 2007 6:11:43 AM
Rank: Advanced Member
Groups: Member

Joined: 8/9/2007
Posts: 59
Thank You

Yes now I am able to see the Date in the DatePicker, But when i click the button for to change the Date, the Calender Image is kind of Distorted?
Any idea?

Thanks,

Cheers
Menon
eo_support
Posted: Friday, September 28, 2007 6:14:55 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
For that I would try to start with a built-in template without any code behind and see if it does that. If it still does that, please post the content of .aspx and .cs/.vb and we will take a look. If not, then you know where to look. :)
Menon
Posted: Friday, September 28, 2007 6:51:53 AM
Rank: Advanced Member
Groups: Member

Joined: 8/9/2007
Posts: 59
Thanks,

I have never tried built-in Template, but will try and get back to you whatever the result is, but after the weekend :)
Have a nice weekend.

Thanks
Cheers

Menon
Menon
Posted: Tuesday, October 2, 2007 1:40:40 AM
Rank: Advanced Member
Groups: Member

Joined: 8/9/2007
Posts: 59
Hi There,

I am trying to make a check when Datepicker is null or not selected anything.

if(DatePicker != null)
{CONDITION}

But its taking some default date 01/01/.... i dont know how. .I am not giving any Default Date in its property.
I am sure it must be something simple. But i am not able get the condition when my DatePicker is NULL.

any help would be appreicated.

And yes i didnt try the built-in template. I just avoided putting the DatePicker in the Grid.
Thanks

Cheers
Madhu
eo_support
Posted: Tuesday, October 2, 2007 6:03:38 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

You are confusing the DatePicker itself and the value of the DatePicker. The DatePicker itself should never be null. In order to check whehter the DatePickr has a value, you will need to do:

if (DatePicker.SelectedDate == DateTime.MinValue)
....

Thanks
Menon
Posted: Thursday, October 4, 2007 12:59:18 AM
Rank: Advanced Member
Groups: Member

Joined: 8/9/2007
Posts: 59
Hi, there

Thank you very much.
Its just that i saw the code for if(DatePicker != null) {CONDITION} (Javascript) in the demo source code.
But yes, my problem is solved ,

Thanks

Cheers
Menon


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.