Hi I am new to Wix and I have developed my own PreSchool website however since I do not have java script programming skills I am struggling to develop an age calculation logic. I would appreciate if anyone of you could help me. I would like to calculate the difference between two dates from two date picker fields. The first date picker field is for child's date of birth and the second date picker field is for child's admission date. Once a potential parent select's the dates in both the date picker field, a number field should calculate and display the child's age in Years, Month and days for example "The pupil's age is 3 Years, 4 Months and 2 days". Furthermore a field should display a text message that if the child's Age is between 3 to 4 years old then "The Pupil is eligible for Nursery Class" and if child's age is between 4 to 5 years old then "The pupil is eligible for Reception Class". If the child's age do not fall between 3 to 5 years then it should display a message that "The pupil is not eligible for admission at Footprints". So the scenario will be:
Child's Date of Birth: Date Picker Field
Child's Admission Date: Date Picker Field
The Pupil's Age is "Difference between above date picker fields" in years, months and days format.
Display any one of the following message based on the age of the child"
The Pupil is eligible for Nursery class if the age falls between 3 to 4 years.
The Pupil is eligible for Reception class if the age falls between 4 to 5 years.
The Pupil is not eligible for admission at Footprints if the age is less than 3 or more than 5 years old.
Thanks in advance.
![](https://static.wixstatic.com/media/a27d24_51aa79c1a0e84e77a08aa8a21e2fea39~mv2.jpg/v1/fill/w_960,h_720,al_c,q_85,enc_auto/a27d24_51aa79c1a0e84e77a08aa8a21e2fea39~mv2.jpg)