Files
docuseal/app/javascript/elements/set_date_button.js
T

21 lines
466 B
JavaScript
Raw Normal View History

2024-11-20 22:49:06 +02:00
export default class extends HTMLElement {
connectedCallback () {
this.button.addEventListener('click', () => {
2024-11-23 01:45:10 +02:00
this.fromInput.value = this.dataset.fromValue || ''
this.toInput.value = this.dataset.toValue || ''
2024-11-20 22:49:06 +02:00
})
}
get button () {
return this.querySelector('button')
}
2024-11-23 01:45:10 +02:00
get fromInput () {
return document.getElementById(this.dataset.fromId)
}
get toInput () {
return document.getElementById(this.dataset.toId)
}
2024-11-20 22:49:06 +02:00
}