This commit is contained in:
2019-03-08 21:21:15 +00:00
parent 4314f12b99
commit 5224a03500
5 changed files with 53 additions and 24 deletions

View File

@@ -1,8 +1,13 @@
// import { isAfter, isEqual } from "date-fns";
// import { parseDate as parse } from "../utils/date";
import dayjs from "dayjs";
/*eslint-disable */
const gzAfterValidator = (value, { targetValue } = {}) => {
if (!targetValue) {
console.log("GZAFTERVALIDATOR - TARGET IS EMPTY!");
return false;
//throw "GZAFTERVALIDATOR - TARGET IS EMPTY";
}
value = dayjs(value);
targetValue = dayjs(targetValue);
@@ -10,8 +15,8 @@ const gzAfterValidator = (value, { targetValue } = {}) => {
if (!value || !targetValue) {
return false;
}
/*eslint-disable */
debugger;
//debugger;
return value.isAfter(targetValue);
};