viewToModelValue method
Returns the value that must be supplied to the control.
Converts value from UI data type to control data type.
Implementation
@override
DateTime? viewToModelValue(String? viewValue) {
final years = int.tryParse(viewValue ?? '');
final dobAge = DigitDOBAge(
years: years ?? 0, months: int.tryParse(existingMonth) ?? 0, days: 1);
return accessor.viewToModelValue(dobAge);
}