New to Kendo UI for jQueryStart a free 30-day trial

Parses a formatted string as a Date. The method returns null if the string doesn't match the format exactly. Also see Date Parsing

Parameters:valueString

The string which should be parsed as Date.

Returns:Date

the parsed date. Returns null if the value cannot be parsed as a valid Date.

<script>
/* The result can be observed in the DevTools(F12) console of the browser. */
  console.log(kendo.parseExactDate("2013/3/4 10:00 AM")); // outputs "Mon Mar 04 2013 10:00:00"
/* The result can be observed in the DevTools(F12) console of the browser. */
  console.log(kendo.parseExactDate("3/4/2013", "MM/dd/yyyy")); // outputs "Mon Mar 04 2013 00:00:00"
  // When the format is not matched, null is returned
/* The result can be observed in the DevTools(F12) console of the browser. */
  console.log(kendo.parseExactDate("3/4/2013", "MM/dd/yy")); // outputs "null"
  // Unlike kendo.parseDate, which tries to parse the string even though it's a different format:
/* The result can be observed in the DevTools(F12) console of the browser. */
  console.log(kendo.parseDate("3/4/2013", "MM/dd/yy")); // Wed Mar 04 2020 00:00:00 GMT+0200"
/* The result can be observed in the DevTools(F12) console of the browser. */
  console.log(kendo.parseExactDate("invalid")); // outputs "null"
</script>
Not finding the help you need?
Contact Support