Wijmo UI for the Web
validateDate Method
wijmo.input Namespace > IFormatValidateLib Interface : validateDate Method
The date value to validate.
The earliest date value to accept.
The latest date value to accept.
The date format to accept. For more information about format keywords, please see Date Format Keywords
The culture to use in validating the date.
Validate the string value according to the specified format string.
Syntax
var instance; // Type: wijmo.input.IFormatValidateLib;
var returnValue; // Type: bool

// Parameters
var value; // Type:  string
var minDate; // Type:  Date
var maxDate; // Type:  Date
var format; // Type:  string
var culture; // Type:  string

returnValue = instance.validateDate(value, minDate, maxDate, format, culture);
function validateDate( 
   value : string,
   minDate : Date,
   maxDate : Date,
   format : string,
   culture : string
) : bool;

Parameters

value
The date value to validate.
minDate
The earliest date value to accept.
maxDate
The latest date value to accept.
format
The date format to accept. For more information about format keywords, please see Date Format Keywords
culture
The culture to use in validating the date.

Return Value

Returns a Boolean value indicating whether the string date value falls within the specified date range.
Example
$.wijinputcore.validateDate("12/3/2012", new Date(2013,0,1), new Date(2013,11,31));  // returns: false
$.wijinputcore.validateDate("平成 25年12月16日", new Date(2013,0,1), new Date(2013,11,31), "ggg ee年MM月dd日");  // returns: false
Remarks
For more information, see Validation Function Library.
See Also

Reference

IFormatValidateLib Interface

Concepts

Validation Function Library