Compare dates

Compare current date with the date from the datefield:

new Date(item.datefield.format("YYYY-MM-DD")) >= new 
Date(today.format("YYYY-MM-DD"))

or

(item.datefield >= new Date(today.format("YYYY-MM-DD 00:00")))

or

item.datefield.isSameOrAfter(today, 'day')

Check the difference between the date specified in the datefield and current date:

item.datefield.diff((new Date()).toISOString().slice(0,10), 'days') == 0

 

Contents