I want to validate a date field where only last 12 months or 15 months accepted from today’s date as well for future date from today’s date any JavaScript code for this condition
I used this logic
var difference = (date2year*12 +date2month + date2day )- (date1year*12 +date1month + date1day )
&
var difference = date2month-date1month +12* (dare2year-date1year)
For calculating the difference