I have noticed that when clearing the values from a date/time picker, the data is still present in the data model even if it is cleared out of the field by the user. Is this expected behavior? If so, any tips on how to clear the model when the value is cleared from the field by the user? I’d prefer to avoid adding a “clear” button but this is my only idea so far.
My picker is below:
{
"dateTimePickerOptions": {
"format": "MM/DD/YYYY",
"icons": {
"today": "fa fa-star"
},
"showTodayButton": true
},
"format": "MM/DD/YYYY",
"label": "<strong>Start Date</strong>",
"model": "form.exp.startDate",
"onChanged_actions": [{
"action": "function",
"function": "model.state.reminderCalculated = false;"
}, {
"action": "namedAction",
"name": "calcTestStartedStopped"
}, {
"action": "namedAction",
"name": "setReminderMessageAndFields"
}],
"required": false,
"styleClasses": "col-md-6",
"type": "dateTimePicker",
"visible_calc": "model.env.show.fields.startDate"
}