fix default date

pull/217/head
Pete Matsyburka 2 years ago
parent b7323b929f
commit 0f51238f62

@ -307,7 +307,7 @@ export default {
formattedDate () { formattedDate () {
if (this.field.type === 'date' && this.modelValue) { if (this.field.type === 'date' && this.modelValue) {
return this.formatDate( return this.formatDate(
new Date(this.modelValue), this.modelValue === '{{date}}' ? new Date() : new Date(this.modelValue),
this.field.preferences?.format || (this.locale.endsWith('-US') ? 'MM/DD/YYYY' : 'DD/MM/YYYY') this.field.preferences?.format || (this.locale.endsWith('-US') ? 'MM/DD/YYYY' : 'DD/MM/YYYY')
) )
} else { } else {

Loading…
Cancel
Save