|
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
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi Menon,
You need to use SelectedDateString property.
Thanks
|
|
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
|
|
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. :)
|
|
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
|
|
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
|
|
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
|
|
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
|
|