JSFiddle - React, Tailwind, and code Playground
JavaScript
if(dateCheck("02.05.2013","02.09.2013","02.07.2013"))
alert("Availed");
else
alert("Not Availed");
function dateCheck(from,to,check) {
var fDate,lDate,cDate;
fDate = new Date(from.split(".")[2],from.split(".")[1],from.split(".")[0]);
lDate = new Date(to.split(".")[2],to.split(".")[1],to.split(".")[0]);
cDate = new Date(check.split(".")[2],check.split(".")[1],check.split(".")[0]);
if((cDate<= lDate) && (cDate >= fDate)) {
return true;
}
return false;
}