From 5406704c747ab19793d89dd20ac5c5e3fc0e0ec3 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 28 Feb 2022 14:06:37 -0700 Subject: [PATCH] Add set_min() & set_max() --- api/js/etemplate/Et2Date/Et2Date.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/api/js/etemplate/Et2Date/Et2Date.ts b/api/js/etemplate/Et2Date/Et2Date.ts index d9a3fb30dc..05a76eb1d4 100644 --- a/api/js/etemplate/Et2Date/Et2Date.ts +++ b/api/js/etemplate/Et2Date/Et2Date.ts @@ -395,6 +395,24 @@ export class Et2Date extends Et2InputWidget(FormControlMixin(ValidateMixin(LitFl return value; } + /** + * Set the minimum allowed date + * @param {string | Date} min + */ + set_min(min : string | Date) + { + this.minDate = min; + } + + /** + * Set the minimum allowed date + * @param {string | Date} max + */ + set_max(max : string | Date) + { + this.maxDate = max; + } + _inputGroupInputTemplate() { return html`