I have following input field for DOB.
<div class="po.pependent">
<input type="text", class="zm-textbox dob-input-mask" placeholder="dd/mm/yyyy" />,
<input type="text", class="zm-textbox dob-input-mask" placeholder="dd/mm/yyyy"/></div>
So if enter dob 11/12/1999 and 11/12/1997 the function paymentForm.computeAge return 17 and 19.
Now in JS i am trying to get the value of these to Dob convert them and get the highest age among the two dob entered.
$(".po.pependent:visible input.zm-textbox.dob-input-mask:visible")
.each(function() {
paymentForm.computeAge($(this).val())
})
This paymentForm.computeAge
return the calculated age from the given dob date comparing with current system date.