Skip to content

Commit

Permalink
only set answer if valid date or not a date
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasnteireho committed Mar 22, 2024
1 parent acf56d5 commit 9ab4380
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/mobile/pages/fields/field/field.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,10 @@ export const FieldVM = DefineMap.extend('FieldVM', {
value = $el.val()
}

_answerVm.values = value
if (((field.type === 'datemdy') && (value.length >= 6)) ||
(field.type != 'datemdy') ){
_answerVm.values = value
}

let errors = _answerVm.errors
field.hasError = errors
Expand Down

0 comments on commit 9ab4380

Please sign in to comment.