before

Returns true if the date value is before the specified date value(s).

See also after.

Syntax

before(date_1[, date_2[, ...]])
Parameter Description
date_i The dates to be compared to.

Examples

Before one date:

$('Date').before($('OtherDate'))
// string representation of dates are supported as well
$('Date').before('2017-01-15')

Before several dates:

$('Date').before($('OtherDate'), $('SomeOtherDate'))