first commit

This commit is contained in:
2024-11-11 15:28:20 +01:00
commit 3f5649dbc7
6231 changed files with 999089 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
/* eslint-disable func-names */
import { getDate } from "./date";
/* Validator min date */
function msgMinDate(min) {
return `Proszę wprowadzić datę po ${min}`;
}
/* Min date must be in format rrrr-mm-dd */
jQuery.validator.addMethod(
"date_min",
function(value, element, params) {
let d;
let min;
try {
d = getDate(value);
min = getDate(params);
} catch (e) {
return this.optional(element) || false;
}
return this.optional(element) || d.compareTo(min) === 1;
},
msgMinDate
);