Click here to Skip to main content
15,893,401 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi i need to compare wether the dates are with in range.. i have two Text box and Two calenders, so there should not be futher date in To TextBox...

DATE FROM AND DATETO ARE MY TWO TEXT BOXES...

SO I NEED JAVASCRIPT TO DO THIS...
Posted

1 solution

This i DID at javascipt..
C#
function ChechDate(txtdate, txtdateto) {
            if (txtdate > new Date('1/1/1753 12:00:00 AM') &&
               txtdateto < new Date('12/31/9999 11:59:59 PM')) {
                return true;
            } else {
                return false;
            }



And at textbox i wrote onkeyup="CheckDate (this);"
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900