add ability to set date field format

This commit is contained in:
Pete Matsyburka
2023-12-17 23:32:05 +02:00
parent 990e4020e9
commit e558f4d9fb
9 changed files with 178 additions and 6 deletions
@@ -261,6 +261,12 @@ export default {
field.options = [{ value: '', uuid: v4() }]
}
if (type === 'date') {
field.preferences = {
format: Intl.DateTimeFormat().resolvedOptions().locale.endsWith('-US') ? 'MM/DD/YYYY' : 'DD/MM/YYYY'
}
}
this.fields.push(field)
if (['signature', 'initials', 'cells'].includes(type)) {