Hi,
I have two inputs - date of birth and age.
When date of birth is populated, it auto-calculates age. This is fine, I have done this by the below:
It takes today’s date, extracts the year and minuses that from the year of the date of birth. It then subtracts a year if the day and month of the date of birth are after todays day and month.
So, all good on that. But, I want the age to continually be updated when the Date of birth field is changed. At the moment, as it is only a condition set to change the initial content, it will change the age up until the point where the age is manually input.
I would like the date of birth field to then be able to re-write the age again.
I don’t necessarily want the date of birth field to always have precedence, but, whenever the date of birth field is changed, it will override the age. A user can still go in and change the age manually. But as soon as they click the date of birth date field again, it will once again override.
Any help would be greatly appreciated.
Thanks.
Cheers,
Brock.