Wijmo UI for the Web
parseDate Method
wijmo.input Namespace > IFormatValidateLib Interface : parseDate Method
The string value to parse as a date.
The dateFormat with which to parse the value.
Default value: d
The culture to use in parsing the date.

Use this method to parse the specified value and return it as a string using the specified format (or type) and options. To use this method, instead of wijmo.input.IFormatValidateLib.parseDate, use $.wijinputcore.parseDate. See example below for the correct usage.

Syntax
var instance; // Type: wijmo.input.IFormatValidateLib;
var returnValue; // Type: Date

// Parameters
var value; // Type:  string
var format; // Type:  string
var culture; // Type:  string

returnValue = instance.parseDate(value, format, culture);
function parseDate( 
   value : string,
   format : string,
   culture : string
) : Date;

Parameters

value
The string value to parse as a date.
format
The dateFormat with which to parse the value.
Default value: d
culture
The culture to use in parsing the date.

Return Value

Returns the parsed date object, or null if the value cannot be parsed with the specified parameters.
Example
$.wijinputcore.parseDate("9/12/2013");  // returns: new Date(2013,8,12)
$.wijinputcore.parseDate("2013/09/12", "yyyy/MM/dd", "ja-JP");  //  returns: new Date(2013,8,12)
$.wijinputcore.parseDate("午後 11:22:33", "tt hh:mm:ss", "ja-JP");  //  returns: new Date(new Date().getFullYear(),0,1,23,22,33)
$.wijinputcore.parseDate("00:12:12", "HH:mm:ss", "ja-JP");   // returns: new Date(new Date().getFullYear(),0,1,0,12,12)
See Also

Reference

IFormatValidateLib Interface

Concepts

Parsing Function Library
Date Format Keywords