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

Formating a Date from WCF Service

5 Answers 157 Views
Grid
This is a migrated thread and some comments may be shown as answers.
mvbaffa
Top achievements
Rank 1
mvbaffa asked on 29 Oct 2011, 04:38 PM
Hi,

I have a WCF Service that returns a date like this: /Date(1305169200000-0300)/
I have used the template suggested in your demos like this:
template: '#= kendo.toString(MyDate,"dd MMMM yyyy") #'

But it did not worked.

How can I format my this field ??? Shoud I use a custom function ???

IN fact I have some other fields like money fields to format, Where can I find a tutorial or documentation

Thanks in advance

5 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 31 Oct 2011, 09:22 AM
Hi Mvbaffa,

 You can check this forum thread for a possible solution. I have implemented a JavaScript function which parses dates in /Date()/ format to JavaScript and then formats it.

Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
mvbaffa
Top achievements
Rank 1
answered on 31 Oct 2011, 01:27 PM
Thanks, I will check it out.
0
mvbaffa
Top achievements
Rank 1
answered on 31 Oct 2011, 02:54 PM
Hi,

I am an ASP.NET and Flex programmer, I do not have much experience in Javascript. So excuse me if this is an obviuos question.

I have servers configured for Regionals Settings in English and I need to discover the regional settings of the client and show and read Dates and Doubles in the client settings.

My Kendo application does not have Postbacks. I work in Javascript and HTML exactly like I do in Flex. The client calls the server to load pages using jQuery and calls the WCF services to get the data necessary in JSON Format.

How can I discover the client Regional settings and work in this fields accordingly ???

Thanks in advance
0
Accepted
Petyo
Telerik team
answered on 01 Nov 2011, 08:42 AM
Hello Mvbaffa,

You can use the HTTP Accept-Language header for this detection. It has its drawbacks, though - check this w3 article for further information. 

All the best,
Petyo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
mvbaffa
Top achievements
Rank 1
answered on 01 Nov 2011, 01:49 PM
Thank you very much
Tags
Grid
Asked by
mvbaffa
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
mvbaffa
Top achievements
Rank 1
Petyo
Telerik team
Share this question
or