﻿// JScript File

 function IsValidDate(Day,Mn,Yr){
    var DateVal = Mn + "/" + Day + "/" + Yr;
    var dt = new Date(DateVal);

    if(dt.getDate()!=Day){
        //alert('Invalid Date');
        return(false);
        }
    else if(dt.getMonth()!=Mn-1){
    //this is for the purpose JavaScript starts the month from 0
        //alert('Invalid Date');
        return(false);
        }
    else if(dt.getFullYear()!=Yr){
        //alert('Invalid Date');
        return(false);
        }
        
    return(true);
 }
