Hello I have 2 fields type date but I would like that my firs field date, I can put any date and in my second field date , the minimum date is the one you select in the first date field
I have this code that i take of this page and URL but it is not function for my help me where is de error
I use the ID's of the Fields and the format is DD/MM/YY
$(document).ready(function () { $('#q5').on('change', function() { var datearray = $('#q5 input').val().split("-"); var montharray = ["Jan", "Feb", "Mar","Apr", "May", "Jun","Jul", "Aug", "Sep","Oct", "Nov", "Dec"]; var year = "20" + datearray[2]; var month = montharray.indexOf(datearray[1])+1; var day = datearray[0]; var minDate = (year +"-"+ month +"-"+ day); $('#q6 input').attr('min',minDate); }); });