Rendering on input element v5
- Vorherrschende Sprache
- JavaScript
- Sterne
- 7.6k
- Forks
- 981
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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
```
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
})
```
and the result in devtools is
```
```
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.