Get the date value in javascript that is convertable to .Net DateTime

2 posts, 1 answers
  1. StevenDale
    StevenDale avatar
    100 posts
    Member since:
    Apr 2007

    Posted 04 Jul 2013 Link to this post

    Using 2013.1.514.340

    When I get the value of a datepicker control in javascript it is return in the following format example: Thu Jul 4 00:00:00 CDT 2013. When I try to use DateTime.Parse to get the .Net Date it returns false. Is there a way to get a value from the DatePicker that is convertible to a .Net DateTime?

    Thanks,

    Billy Jacobs
  2. Answer
    StevenDale
    StevenDale avatar
    100 posts
    Member since:
    Apr 2007

    Posted 04 Jul 2013 Link to this post

    I figured it out:
    function getParameter() {                      
            return {
     
                startDate: kendo.toString($("#StartDatePicker").data("kendoDatePicker").value(), 'd'),
                endDate: kendo.toString($("#EndDatePicker").data("kendoDatePicker").value(), 'd')
     
            };
        }
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top