Hi! very interested in using a vanilla version of this plugin... I am trying to render on an input element like shown below but when I select a date on the calendar, the input's value is not updated automatically and when I tried to access it with the pickadate:change the event fires but I don't have access to the formatted value as it says in the docs. Thanks in advance for the help
const initialState = {
selected: new Date(Date.now()), // this value is shown in the input on first load
template: 'MM/DD/YYYY'
}
const picker = pickadate.create(initialState)
const inputEl = document.getElementById('element')
pickadate.render(inputEl, picker)
inputEl.addEventListener('pickadate:change', (customEvent) => {
console.log('New value:', customEvent) // => this custom event doesn't have the formatted value
})
Hi! very interested in using a vanilla version of this plugin... I am trying to render on an input element like shown below but when I select a date on the calendar, the input's value is not updated automatically and when I tried to access it with the pickadate:change the event fires but I don't have access to the formatted value as it says in the docs. Thanks in advance for the help
html
JS
and the result in devtools is