mirror of https://github.com/docusealco/docuseal
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
516 B
22 lines
516 B
export default class extends HTMLElement {
|
|
connectedCallback () {
|
|
if (this.dataset.inputId) {
|
|
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
|
|
if (this.dataset.params === 'true') {
|
|
const params = new URLSearchParams(this.input.value)
|
|
|
|
params.set('timezone', timezone)
|
|
|
|
this.input.value = params.toString()
|
|
} else {
|
|
this.input.value = timezone
|
|
}
|
|
}
|
|
}
|
|
|
|
get input () {
|
|
return document.getElementById(this.dataset.inputId)
|
|
}
|
|
}
|