frontello-ui-datepicker
Advanced tools
Comparing version 2.0.2 to 2.0.3
@@ -32,3 +32,7 @@ "use strict"; | ||
this._loadInputdate(); | ||
this.field.addEventListener('change', (e) => { | ||
this._renderInputType(); | ||
this.field.addEventListener('change', () => { | ||
this._renderInputType(); | ||
this._loadInputdate(false); | ||
@@ -38,2 +42,11 @@ }); | ||
_renderInputType() | ||
{ | ||
if (this.date == null) { | ||
this.field.type = 'text'; | ||
} else { | ||
this.field.type = 'date'; | ||
} | ||
} | ||
openPicker() | ||
@@ -251,7 +264,3 @@ { | ||
if (eventChange) { | ||
this.field.dispatchEvent(new Event('change', { | ||
'detail': { | ||
'source': 'datepicker' | ||
} | ||
})); | ||
this.field.dispatchEvent(new Event('change')); | ||
} | ||
@@ -357,4 +366,3 @@ } | ||
this.field.addEventListener('focus', (event) => { | ||
//this.openPicker(); | ||
// Selecting the date on click triggers a focusout... | ||
this.openPicker(); | ||
}); | ||
@@ -371,4 +379,8 @@ this.field.addEventListener('click', (event) => { | ||
this.field.addEventListener('focusout', (event) => { | ||
//this.closePicker(); | ||
// Selecting the date on click triggers a focusout... | ||
setTimeout(() => { | ||
console.log(document.activeElement); | ||
if (document.activeElement.tagName != 'BODY') { | ||
this.closePicker(); | ||
} | ||
}, 0); | ||
}); | ||
@@ -375,0 +387,0 @@ this.actionClear.addEventListener('click', () => { |
{ | ||
"name": "frontello-ui-datepicker", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "UI datepicker", | ||
@@ -5,0 +5,0 @@ "main": "datepicker.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20384
645