This is a migrated thread and some comments may be shown as answers.

[Solved] RadDateInput problems

4 Answers 169 Views
Input
This is a migrated thread and some comments may be shown as answers.
Bob
Top achievements
Rank 1
Bob asked on 27 Mar 2008, 02:29 PM
My first attempt at using this control.  I am using the RadDateInput on a user control where the date can be changed.  When the user control first loads, I want the RadDateInput to display the date from the database.  If I make this an asp:textbox, it works fine.  But If I make it a radDateInput control, the value is blank.  Here is my code:

<

telerik:RadDateInput ID="diPolicyAccountValue"

runat="server"

DateFormat="d"

SelectedDate='<%# DataBinder.Eval( Container, "DataItem.PolicyAccountValueDate") %>'>

</telerik:RadDateInput>



What am I doing wrong?

Thanks,
Bob

4 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 28 Mar 2008, 03:44 PM
Hello Bob,

In this scenario you should use the DbSelectedDate property of the control as opposed to the SelectedDate property.
I hope this suggestion helps.

Kind regards,
Maria Ilieva
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Bob
Top achievements
Rank 1
answered on 28 Mar 2008, 04:41 PM
Maria,

That did not work.  Here is my code:

<telerik:RadDateInput ID="diPolicyAccountValue"

runat="server"

DateFormat="d"

DbSelectedDate ='<%# DataBinder.Eval( Container, "DataItem.PolicyAccountValueDate") %>'>

</telerik:RadDateInput>

The date does not appear when I call the user control.  But if I put the same date in a asp:textbox, it does appear.

<asp:TextBox ID="tbPolicyAccountValueDate"

runat="server"

TabIndex="1"

Text='<%# DataBinder.Eval( Container, "DataItem.PolicyAccountValueDate") %>'>

</asp:TextBox>

So what am I doing wrong?

Thanks,
Bob

0
Bob
Top achievements
Rank 1
answered on 31 Mar 2008, 12:37 PM
I figured it out.  It had to do with the AjaxManager.  When I removed this, it worked.

Another problem:

I'd like to have my date display like 3/31/2008 in my

RadDateInput

control.  How can I do this?

Thanks Bob
0
Maria Ilieva
Telerik team
answered on 31 Mar 2008, 01:44 PM
Hi Bob,

In order to acheive this, you should set the DateFormat property of the RadDateInput to M/d/yyyy;

Let us know if further help is needed.

Sincerely yours,
Maria Ilieva
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Input
Asked by
Bob
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Bob
Top achievements
Rank 1
Share this question
or