From 4776810be929951feefdef97318e7f0b2a628b30 Mon Sep 17 00:00:00 2001 From: George Serbanescu Date: Wed, 15 Apr 2020 14:45:43 +0300 Subject: [PATCH] fix: validators use validatorName instead of name --- packages/input-datepicker/src/LionInputDatepicker.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/input-datepicker/src/LionInputDatepicker.js b/packages/input-datepicker/src/LionInputDatepicker.js index f7fbfc3c6..47b88bac5 100644 --- a/packages/input-datepicker/src/LionInputDatepicker.js +++ b/packages/input-datepicker/src/LionInputDatepicker.js @@ -333,14 +333,14 @@ export class LionInputDatepicker extends ScopedElementsMixin(OverlayMixin(LionIn // On every validator change, synchronize disabled dates: this means // we need to extract minDate, maxDate, minMaxDate and disabledDates validators validators.forEach(v => { - if (v.constructor.name === 'MinDate') { + if (v.constructor.validatorName === 'MinDate') { this.__calendarMinDate = v.param; - } else if (v.constructor.name === 'MaxDate') { + } else if (v.constructor.validatorName === 'MaxDate') { this.__calendarMaxDate = v.param; - } else if (v.constructor.name === 'MinMaxDate') { + } else if (v.constructor.validatorName === 'MinMaxDate') { this.__calendarMinDate = v.param.min; this.__calendarMaxDate = v.param.max; - } else if (v.constructor.name === 'IsDateDisabled') { + } else if (v.constructor.validatorName === 'IsDateDisabled') { this.__calendarDisableDates = v.param; } });