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

Date time picker not giving desired format one some machines

1 Answer 62 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Muhamed Shafi
Top achievements
Rank 1
Muhamed Shafi asked on 20 Jun 2011, 02:06 PM
Hi there,
    We use a rad date time picker  which gives us some sort of error in some particular machines. The date format we used is MM/dd/yyyy and culture is English (United States). But in some machines, radPicker.SelectedDate property still gives dd/MM/yyyy format. Below is the source of the same for your reference

<

 

telerik:RadDatePicker ID="radPicker1" runat="server" Culture="English (United States)"

 

 

EnableTyping="True">

 

 

<Calendar runat="server" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x">

 

 

</Calendar>

 

 

<DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>

 

 

<DateInput runat="server" DisplayDateFormat="dd-MMM-yyyy" DateFormat="MM/dd/yyyy">

 

 

</DateInput>

 

 

</telerik:RadDatePicker>

 


Could you please find the solution for it ?
Thanks
Shafi

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 23 Jun 2011, 02:29 PM
Hello Shafi,

Please note that the server side SelectedDate property contains a DateTime object that will be formatted based on the current culture of the page. The same is valid for any other DateTime object - to verify this on the problematic machines, just create a dummy date time object and check its format. If it is "dd/MM/yyyy" then the problem would probably be related to the way your page initializes its culture.

I hope this helps.

Regards,
Martin
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
Muhamed Shafi
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or