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

[Solved] Set DateFormat Server side

3 Answers 126 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Clinton
Top achievements
Rank 1
Clinton asked on 06 May 2009, 02:31 PM
Hi,

I am trying to set the DateFormat attribute in the Calendar's DateInput on server side,

I have tried to access the DateInput.DateFormat property through code, but I dont seem to be able to access it.

Anyone can help with this issue?

Regards
Clinton

3 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 07 May 2009, 05:53 AM
Hello Clinton,

I tried the scenario and its working fine for me. Here is the code that I tried.

[ASPX]
 
    
<telerik:raddatepicker id="RadDatePicker1" runat="server">     
</telerik:raddatepicker>    
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Set Format" /> 

[CS]
 
protected void Button1_Click(object sender, EventArgs e)  
{  
    RadDatePicker1.DateInput.DateFormat = "MMM d  yyyy";  
    RadDatePicker1.DateInput.DisplayDateFormat = "MMM d  yyyy";  
Go through the folowing link which shows a list of the standard format characters:
Date Format Patterns

Thanks,
Prncy.
0
Clinton
Top achievements
Rank 1
answered on 07 May 2009, 08:00 AM
Hi,

Thanks for the fast reply.

Just one other thing, could you please tell me which assembly are you referencing to use the control.

At the moment I have the following reference for my control, and its still not letting me edit the dateinput on server side:

<%

@ Register Assembly="RadCalendar.Net2" Namespace="Telerik.WebControls" TagPrefix="radCln" %>

Thanks
Clinton

 

0
Clinton
Top achievements
Rank 1
answered on 07 May 2009, 02:37 PM
Thanks for the help, the issue was due to a missing dll reference

Thanks again
Clinton
Tags
Calendar
Asked by
Clinton
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Clinton
Top achievements
Rank 1
Share this question
or