From 4cb1557aa04d49516a992e202dd50aa415d5776f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Augusto=20Salim?= Date: Wed, 20 Apr 2022 11:23:05 -0300 Subject: [PATCH] Datepicker does not hide The datepicker does not hide: adding classes `active` and `block` with `hidden` does not hide the dp. Using `toggle` to add/remove classes. --- js/picker/Picker.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/js/picker/Picker.js b/js/picker/Picker.js index cc3c421..44022b9 100644 --- a/js/picker/Picker.js +++ b/js/picker/Picker.js @@ -202,9 +202,8 @@ export default class Picker { if (!this.active) { return; } - this.datepicker.exitEditMode(); - this.element.classList.remove('active', 'block'); - this.element.classList.add('active', 'block', 'hidden'); + this.datepicker.exitEditMode(); + this.element.classList.toggle('active', 'block', 'hidden'); this.active = false; triggerDatepickerEvent(this.datepicker, 'hide'); }