I have to change the value of a raddateinput server side.
On client side I have an Ajax function than show the age.
What I have to use on server-side and on client-side to fie event?
For example this doesn't works:
server side:
RdMyDateInput.SelectedDate = DateTime.Parse(MyStringDate);
client side:
<telerik:RadDateInput ID="RdNyDateInput" runat="server" ClientEvents-OnValueChanged="AgeCount" Culture="it-IT" MaxDate="2999-12-31" MinDate="1900-01-01" Skin="Silk">
<ClientEvents OnValueChanged ="AgeCount"></ClientEvents>
</telerik:RadDateInput>
the event fires only on web page, not by server side.
Thanks
Renati
Hi Renati,
I am not sure I understand the question. Are you looking for the server-side event that triggers when the value changes or you are trying to make an AJAX request to set the value on the server?
Dear Attila,
if user change value on page the component fire correctly the event.
I'm not able to do the same when I change the value from server side.
Probably I'm making something wrong. I will study it.
Thanks
Renato
Hi Renato,
The Code you showed us is the correct way to set a date for the DateInput.
You just have to make sure that the "MyStringDate" returns a valid date format, so the Parse function will not throw an exception. Once you have a DateTime object, you can assign it to the SelectedDate property of the DateInput.