Fix "value.format is not a function" bug
Fix "value.format is not a function" bug

Fixes #513

The value passed to isValid is a momentjs instance, which
can't be compared using > < operators.  This switches to
the isBefore and isAfer methods with the granularity set to day.

Also if false was returned from the date picker, the min property
would be used.  However if the min property is a plain date object
it would lack the .format method which was later called on it.

openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js