parseDate

Parses as a formatted string as a Date. Also see Date Parsing

Example

<script>
/* The result can be observed in the DevTools(F12) console of the browser. */
  console.log(kendo.parseDate("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.parseDate("3/4/2013", "MM/dd/yyyy")); // outputs "Mon Mar 04 2013 00:00:00"
/* The result can be observed in the DevTools(F12) console of the browser. */
  console.log(kendo.parseDate("invalid")); // outputs "null"
</script>

Parameters

value String

The string which should be parsed as Date.

formats String|Array (optional)

The format(s) that will be used to parse the date. If you do not explicitly state a date parsing format, the standard date formats of the current culture will apply.

For more information on the custom date parsing formats, refer to this article.

culture String (optional)

The culture used to parse the number. The current culture is used by default.

Returns

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

In this article