adjust filters

This commit is contained in:
Pete Matsyburka
2024-11-23 01:45:10 +02:00
parent b86aac86d1
commit 9beaaa0851
28 changed files with 410 additions and 304 deletions
+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)
}
}