I want to check end_date should be less than the start date in a form ....
So this is my code
start_date = $("#form_data")[0].elements.start_date.value
end_date = $("#form_data")[0].elements.end_date.value
if(start_date < end_date){
}
else{
}
I'm getting date as MM-DD-YYYY format
Thiw will not work in the following codition
start_date = 12/01/2020
end_date = 01/01/2021
I deally December 1 2020 should be less than 1 January 20201
How do I fix this