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

Q1 Release, DateFormatting Issue

6 Answers 27 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Andy McShane
Top achievements
Rank 1
Andy McShane asked on 16 Mar 2010, 04:44 PM
I have just upgraded to Q1 release and have noticed a change in the datetime formatting in my grids when loading using Ajax.

I have a grid that has 2 date fields that are formatted as follows;

            columns.Add(o => o.LicenceStartDate).Format("{0:dd/MM/yyyy}").Title(ViewData["txtStartDate"].ToString());
            columns.Add(o => o.LicenceEndDate).Format("{0:dd/MM/yyyy}").Title(ViewData["txtEndDate"].ToString());

When my grid loads I get the following date format output '01/03/2010'

However if I then click refresh or sort a column my dates get formatted like this 'Mon Mar 01 2010 00:00:00 GMT+0000 (GMT Standard Time)', what has changed? What did I miss?



6 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 16 Mar 2010, 04:51 PM
Hi Andy McShane,

This is a strange issue and we have never seen it before. Do you see any JavaScript errors when you sort the grid? Reverting to default JavaScript date format means that something wrong happened during ajax binding. I tried to reproduce it in the first look grid example to no avail. The format set for the column should persist between initial loading and sorting/paging. As always we would appreciate a live url or some steps to reproduce this issue. Can this be seen in the web site which you provided in one of your other forum threads?

Regards,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Andy McShane
Top achievements
Rank 1
answered on 16 Mar 2010, 05:41 PM
Yes, this behaviour can be observed on the site I provided a link for,

Once logged in click on 'Customer Administration',
Select 'Edit' for 'Customer ID' 7,
Select 'Licence Details' tab,
Click on the column header for one of the dates.
0
Atanas Korchev
Telerik team
answered on 17 Mar 2010, 09:00 AM
Hi Andy McShane,

I couldn't find a link to 'Customer Administration'. I have attached a link showing the initial screen.

Date sorting seems to work fine on another page http://mvc.asmwp.co.uk/ServiceUser

Regards,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Andy McShane
Top achievements
Rank 1
answered on 17 Mar 2010, 10:27 AM
Sorry, been playing with translations! select the first option on the list on the first page 'Kundenverwaltung', then select 'Kunden Id' 7, then select the second tab 'Licence Details'.
0
Accepted
Atanas Korchev
Telerik team
answered on 17 Mar 2010, 12:42 PM
Hi Andy McShane,

I believe I have found the problem. Since the Q1 release the grid has a dependency on telerik.calendar.js if it contains columns bound to DateTime (basically most of the date-related routines have been moved there including formatting). This is mentioned in our Changes and Backward Compatibility help topic. The solution is to include telerik.calendar.js as well. If you plan to use filtering you should also include telerik.datepicker.js.

Regards,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Andy McShane
Top achievements
Rank 1
answered on 17 Mar 2010, 01:11 PM
Adding those scripts sorted it, thanks!
Tags
Grid
Asked by
Andy McShane
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Andy McShane
Top achievements
Rank 1
Share this question
or