i have 1 problem, i wanna compare two dates between date born and today, the condition is date born must be less than today date, it worked at first, but if i pick another date from datepicker which is less than today, its still pop up alert. And it not ok. Anyone know why this this happened?
    function submitForm() {
        
        var dateborn = document.getElementById('dateborn').value;   
        var today = document.getElementById('today').value;
        
        if(dateborn != '')
        {           
            if(dateborn > today)
            {
            swal("Oops", "Date born must less than date today", "error");       
            return false;
            }
        }
            
    }
 
     
     
    