Skip to content

Migrating from v10

Breaking changes

  • Library now requires vue >= v3.3
  • Calendar cells id attribute is now prefixed with dp-
  • Calendar cells data-test-id attribute now matches the id value
  • Ref dpWrapMenuRef is now exposed via the getter function getDpWrapMenuRef 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 

Released under the MIT License.