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

RadDatepicker dateformat not working

1 Answer 129 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Basharat
Top achievements
Rank 1
Basharat asked on 26 Feb 2013, 08:26 PM
Hi I am setting the properties of RadDatepicker as follows:

 <telerik:RadDatePicker ID="rdpCommunicationDate" runat="server" SelectedDate='<%# rdpCommunicationDate.MaxDate.AddDays(-1) %>'
                                EnableEmbeddedScripts="true" >
                                <DateInput MinDate="01/01/1000" MaxDate="12/31/3000" DisplayDateFormat="MMMM dd yyyy" DateFormat="dd/MM/yyyy" EmptyMessage="YYYY MM DD" >
                                </DateInput>
                                <ClientEvents  OnDateSelected="OnDateSelected">
                        </ClientEvents>
                            </telerik:RadDatePicker>


when I enter the date in format "yyyy MM dd" it is always taken as yyyy dd MM. Unless the month part is greater than 12 for example:
2000 01 23.

1 Answer, 1 is accepted

Sort by
0
MasterChiefMasterChef
Top achievements
Rank 2
answered on 27 Feb 2013, 06:08 PM
Hi Basharat,

In your "DateFormat" you have declared "dd/MM/yyyy", which will select the day before the month. try changing the format to "MM/dd/yyyy" (or even "MM/dd/yyyy") and it should take the first number as the Month.

To familiarize yourself with formatting with the RadDatePicker, look at the page in documentaiton here:
http://www.telerik.com/help/aspnet-ajax/calendar-dateinput-formatting-values.html

Hopefully this helps,
Master Chief
Tags
General Discussions
Asked by
Basharat
Top achievements
Rank 1
Answers by
MasterChiefMasterChef
Top achievements
Rank 2
Share this question
or