Migrating from v10
Breaking changes
- Library now requires
vue >= v3.3
- Calendar cells
id
attribute is now prefixed withdp-
- Calendar cells
data-test-id
attribute now matches theid
value - Ref
dpWrapMenuRef
is now exposed via thegetter
functiongetDpWrapMenuRef
instead of direct access
Calendar cell id
update
js
import { format } from 'date-fns';
const formatToken = `yyyy-MM-dd`;
document.getElementById(format(new Date(), formatToken))
document.getElementById(`dp-${format(new Date(), formatToken)}`)
Calendar cell data-test-id
update
js
import { format } from 'date-fns';
const formatToken = `yyyy-MM-dd`;
document.querySelector(`[data-test-id="${new Date()}"]`)
document.querySelector(`[data-test-id="dp-${format(new Date(), formatToken)}"]`)
dpWrapMenuRef
Instead of directly accessing the ref
, it is now wrapped in a function
js
datePickerInstance.dpWrapMenuRef.value
datePickerInstance.getDpWrapMenuRef().value