Wednesday, 21 January 2015

To Date Greater than or Equal to From Date using javascirpt ?

<script type="text/javascript">
    function Dateformat()
        {
        
     var SDate =document.getElementById("<%=txtCaseStatusBetween.ClientID %>").value;
     var EDate =document.getElementById("<%=txtAnd.ClientID %>").value;


          var startDate = new Date(SDate);
          var endDate = new Date(EDate);
       
     if(startDate > endDate)
    {
          alert("Please ensure that the End Date is greater than or equal to the Start Date");
          document.getElementById("<%=txtFRom.ClientID %>").innerHTML=="";
          document.getElementById("<%=txtTo.ClientID %>").innerHTML=="";
        return false;
    }
}


</script>

No comments:

Post a Comment