Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
SQL
function validateDate()
            {
                        serverDateTime="2012-11-23 17:06:46";
                txtDate.value="30-Nov-2012"

                if (how i check here)
                {
                           alert("Appointment can be fixed for next seven days only from current day.");
                    return false;
                }
                else
                {
                    return true;
                }
            }

i m getting serverDateTime on master page load and access that variable in all pages and comparing serverDateTime with txtDate.value how i validate Appointment can be fixed for next seven days only from current day.
Posted
Updated 23-Nov-12 1:32am
v2

1 solution

Check this link[^]. It shows how to get number of days between two dates. If the result is greater than 7 then you need to show the alert message.
 
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