Formating a Date from WCF Service

6 posts, 1 answers
  1. mvbaffa
    mvbaffa avatar
    102 posts
    Member since:
    Dec 2006

    Posted 29 Oct 2011 Link to this post

    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
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 31 Oct 2011 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. mvbaffa
    mvbaffa avatar
    102 posts
    Member since:
    Dec 2006

    Posted 31 Oct 2011 Link to this post

    Thanks, I will check it out.
  5. mvbaffa
    mvbaffa avatar
    102 posts
    Member since:
    Dec 2006

    Posted 31 Oct 2011 Link to this post

    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
  6. Answer
    Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 01 Nov 2011 Link to this post

    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!
  7. mvbaffa
    mvbaffa avatar
    102 posts
    Member since:
    Dec 2006

    Posted 01 Nov 2011 Link to this post

    Thank you very much
Back to Top
Kendo UI is VS 2017 Ready