frontello-ui-datepicker
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -16,4 +16,2 @@ "use strict"; | ||
this.field.value = date.getDate(); | ||
//this.field.dispatchEvent(new Event('change')); | ||
// Generate a event loop... | ||
}, | ||
@@ -35,4 +33,4 @@ formatExportDate: (date) => { | ||
this._loadInputdate(); | ||
this.field.addEventListener('change', () => { | ||
this._loadInputdate(); | ||
this.field.addEventListener('change', (e) => { | ||
this._loadInputdate(false); | ||
}); | ||
@@ -91,3 +89,3 @@ } | ||
unsetDate() | ||
unsetDate(eventChange = true) | ||
{ | ||
@@ -101,6 +99,6 @@ if (this.config.debug) { | ||
this._renderDate(); | ||
this._renderDate(eventChange); | ||
} | ||
setDate(date = null) | ||
setDate(date = null, eventChange = true) | ||
{ | ||
@@ -119,3 +117,3 @@ if (this.config.debug) { | ||
this._renderDate(); | ||
this._renderDate(eventChange); | ||
} | ||
@@ -235,3 +233,3 @@ | ||
_renderDate() | ||
_renderDate(eventChange = true) | ||
{ | ||
@@ -255,2 +253,10 @@ if (this.config.debug) { | ||
this.config.dateChange(this); | ||
if (eventChange) { | ||
this.field.dispatchEvent(new Event('change', { | ||
'detail': { | ||
'source': 'datepicker' | ||
} | ||
})); | ||
} | ||
} | ||
@@ -325,2 +331,6 @@ | ||
this.container.addEventListener('click', () => { | ||
this.field.focus(); | ||
}); | ||
this._buildSummary(); | ||
@@ -536,8 +546,8 @@ this._buildNav(); | ||
_loadInputdate() | ||
_loadInputdate(eventChange = true) | ||
{ | ||
if (this.field.value) { | ||
this.setDate(this.field.value); | ||
this.setDate(this.field.value, eventChange); | ||
} else { | ||
this.unsetDate(); | ||
this.unsetDate(eventChange); | ||
} | ||
@@ -544,0 +554,0 @@ } |
{ | ||
"name": "frontello-ui-datepicker", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "UI datepicker", | ||
@@ -5,0 +5,0 @@ "main": "datepicker.js", |
Sorry, the diff of this file is not supported yet
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
20239
636