Open ripdog opened 10 years ago
regarding
var cleanDate = moment(this.value).startOf('day'); var provObject = unusualDays.findOne({date: cleanDate, providerID: this.field("providerID").value}); if (typeof provObject === "undefined") { provObject = providers.findOne(this.field("providerID").value); } //this may fail due to timezone? try on nz timezone server. if(moment(this.value).isValid() === false) { return "wtf" } else if (moment(this.value).isBefore(cleanDate.zone(-12).hours(provObject.startTime).utc())) { return "minDate" } else if (moment(this.value).isAfter(cleanDate.zone(-12).hours(provObject.endTime).utc())) { return "maxDate" }
regarding