Good, I have two dates in string type, such as the following:
var fecha1 = '2018-11-03';
var fecha2 = '2018-02-03';
And I want to know which is the most efficient code to compare those two dates and know if the difference of months is 2 or higher.
Edit: I have a form with bootstrap and if you tell me the validation code better than better, for now I only have the following in that validation:
fecha: {
validators:{
notEmpty: {
message: 'Seleccione una fecha valida'
}
}
},