DocTrix Forms for Office 365
- Create your first form
- Build expression with the reference to the other field(s) value
- Get value out of the fields and controls
- Check if the value of a field is empty
- Make user redirect to the URL
- Fill in current user in User/Group fields by default
- Get user name or id
- Compare user values
- Check current user for SharePoint Online user group membership
- Compare dates
- Limit the number of symbols in text field
- Get value of lookup field
- Set default value for the field
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
You may also use Moment.js to work with dates.