Hello Friends ,
I m new in Javascript
i m trying to validate two date coming in the format DD-MON-YYYY
coming through PopUP-Calendar
in two textboxes but unable to get required result I musing following function:
<script type="text/javascript">
function check(){
var SDate = document.form.previous_date.value;
var EDate = document.form.next_date.value;
if (SDate == '' || EDate == '') {
alert("Plesae enter both....");
return false;
}
var endDate =new Date.parse(EDate);
var startDate =new Date.parse.Date(SDate);
if(startDate > endDate)
{
alert("Please ensure that the End Date is greater than or equal to the Start Date.");
document.calldate.next_day.focus();
return false;
}
}
</script>
Thank In Advance