Update date.js

added check to ensure undefined values don't make it to jquery datepicker... this was needed because model may not be available at time of inital load and this leads to errors being logged unnecessarily