Maybe you could try this out as outlined in the image below:
In the survey tab of your xlsform:
Data entry screen as seen in Enketo: When a wrong entry is made
Data entry screen as seen in Enketo: When a correct entry is made
Reference xlsform:
Calculate Age.xlsx (9.7 KB)