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 date not past */
jQuery.validator.addMethod(
"date_not_past",
function(value, element) {
let d;
try {
d = getDate(value);
} catch (e) {
return this.optional(element) || false;
}
const today = Date.today();
return this.optional(element) || d.compareTo(today) !== -1;
},
"Data nie może być z przeszłości."
);
/* Date validator not past */
jQuery.validator.addClassRules("js-validation-date-not-past", {
date: true,
date_not_past: true,
});