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

what format is given me the datePicker

2 Answers 87 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 12 Nov 2013, 09:37 AM
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,
Daniel

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 Answers, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 14 Nov 2013, 09:16 AM
Hi Daniel,

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

Regards,
Alexander Popov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Daniel
Top achievements
Rank 1
answered on 28 Nov 2013, 09:02 AM
thank you for the recomandation.
Tags
Date/Time Pickers
Asked by
Daniel
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Daniel
Top achievements
Rank 1
Share this question
or