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

DatePicker Error in IE8

1 Answer 45 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Cyndie
Top achievements
Rank 1
Cyndie asked on 13 Aug 2012, 06:11 PM
I'm receiving the following error when a date is either typed in or selected in a DatePicker in IE8 (doesn't happen in IE9)

Microsoft JScript runtime error: Object doesn't support property or method 'substr'
The error is happening on line 1346 of kendo.web.js

The DatePicker is in a pop-up editor:
The data is queried via a web service with a JSON response.

I am using a custom parser for the date returned from the service

I'm not sure why I'm receiving this error.
function customParser(data) {
    if (data != null) {
        var str = data.toString();
        if (str.indexOf("Date") >= 0)
            return new Date(parseInt(data.substr(6)));
    }
    else
        return data;

<!-- datepicker editor for field: "ManufactureDate" -->
        <input type="text"
            name="ManufactureDate"
            data-type="date"
            data-bind="value:ManufactureDate"
            data-role="datepicker" />

1 Answer, 1 is accepted

Sort by
0
Cyndie
Top achievements
Rank 1
answered on 14 Aug 2012, 12:14 PM
I figured out the issue.  I was using the parser for display purposes, but it was not needed for the datepicker.
Tags
Date/Time Pickers
Asked by
Cyndie
Top achievements
Rank 1
Answers by
Cyndie
Top achievements
Rank 1
Share this question
or