what format is given me the datePicker

3 posts, 0 answers
  1. Daniel
    Daniel avatar
    192 posts
    Member since:
    Mar 2012

    Posted 12 Nov 2013 Link to this post

    Hello again,

    if i have a kendo DatePicker
    and i get the value of that something like that:
    var startDate = $(employee.currentStartDate).data("kendoDatePicker").value().toString();
    i send to the server as a string,but i try to parse this date in .net C#
    i tried something like

     public ActionResult GetEndDateValues(string startDate)
                DateTime contractVersionStartDate = DateTime.ParseExact(startDate, "g", null); also i tried G,D,d,still not recognized
    if on the client,i put toUTCString(),or toISOString(), then the date is 2 hour behind,so i get the yesterday date(ex. 26.11.2013,i get 25.11.2013 22:00:00 pm)
    is not ok.
    so can you help me clarify this?
    i want no matter what local culture is,to send it from client,and parse right on the server.

    Best Regards,

    P.S:if i enter in my telerik account,and i click on a post,no longer sends me to my post,i have to look over it,in the whole kendo forum.before it wasn't like that.
  2. Alexander Popov
    Alexander Popov avatar
    1411 posts

    Posted 14 Nov 2013 Link to this post

    Hi Daniel,

    I would recommend using the approach demonstrated in this Code Library project.

    Alexander Popov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Daniel
    Daniel avatar
    192 posts
    Member since:
    Mar 2012

    Posted 28 Nov 2013 Link to this post

    thank you for the recomandation.
Back to Top