Skip to content

Events ​

Native events ​

Every change fires input and then change on the native input, bubbling, exactly like a user change on a native input. A range fires both on the start and the end input.

js
document.querySelector('#publishDate').addEventListener('change', (event) => {
  console.log(event.target.value); // '2026-10-12'
});

setValue(value, { silent: true }) changes the value without events.

Picker events ​

Fired on the element with data-flow-datepicker (the input, or the range wrapper). They bubble and carry the picker in event.detail.picker.

EventWhen
fdp:initthe picker started
fdp:openthe popover opened
fdp:closethe popover closed
fdp:destroythe picker was destroyed
js
document.addEventListener('fdp:open', (event) => {
  console.log(event.detail.picker.getValue());
});
  1. Events appear here.

Released under the MIT License.