Because of the default value of the startDate prop it's not possible to use the formatDate prop without overriding the startDate every time.
startDate: {
type: String,
required: false,
default: dayjs().format('YYYY-MM-DD'), // hardcoded format does not respect the formatDate prop
},
Solution
I removed the default value which is using a hardcoded format and added a today fallback for the initialization of the startDatepicker variable instead.
Problem
Because of the default value of the
startDate
prop it's not possible to use theformatDate
prop without overriding thestartDate
every time.Solution
I removed the default value which is using a hardcoded format and added a
today fallback
for the initialization of thestartDatepicker
variable instead.