Date parse error when setting time

2 posts, 0 answers
  1. Alan Mosley
    Alan Mosley avatar
    200 posts
    Member since:
    Apr 2010

    Posted 14 Jan 2015 Link to this post

    I am trying to set the time of a date picker to 1 hour later but keep getting an error, (only when adding hour)
    Date.prototype.addHours = function (h) {
        this.setTime(this.getTime() + (h * 60 * 60 * 1000));
        return this;
    }   
     
    var d = new Date(e.event.start)
                d.addHours(1)
                $("#endx").kendoDateTimePicker({
                    value: d
                });

    I keep getting an error here in kendo.all.js line 1477
    if (value && value.indexOf("/D") === 0) {
    Where value is a number, and does not support indexOf

    Thanks
  2. Alan Mosley
    Alan Mosley avatar
    200 posts
    Member since:
    Apr 2010

    Posted 14 Jan 2015 in reply to Alan Mosley Link to this post

    OK I solved it,
    it should have been
    value: new Date(d)
    Thanks
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top