adjust filters

This commit is contained in:
Pete Matsyburka committed 2024-11-23 17:38:11 +02:00
1 parent b86aac86d1
commit 9beaaa0851
28 files changed
+410 -304

No files matched your search

+10 -7
View File
@@ -1,17 +1,20 @@
export default class extends HTMLElement {
connectedCallback () {
this.dateFrom = this.dataset.fromValue
this.dateTo = this.dataset.toValue
this.dateFromInput = document.getElementById(this.dataset.fromId)
this.dateToInput = document.getElementById(this.dataset.toId)
this.button.addEventListener('click', () => {
this.dateFromInput.value = this.dateFrom || ''
this.dateToInput.value = this.dateTo || ''
this.fromInput.value = this.dataset.fromValue || ''
this.toInput.value = this.dataset.toValue || ''
})
}
get button () {
return this.querySelector('button')
}
get fromInput () {
return document.getElementById(this.dataset.fromId)
}
get toInput () {
return document.getElementById(this.dataset.toId)
}
}