Checking that an entered date is before the current date
Just wanted to chime in:


Nobody mentioned this, but isValidDate() to determine whether 1 date is earlier than another date is frankly terrible. Call it isEarlierDate()
Where are the variables? Are those variables all defined outside of this function. That does not look good.
If there is one thing you learn today it is that this

if(day&lt;=dayCurr)
    return true;
else
    return false;


should always be written as

return day&lt;=dayCurr

As per @Heslacher, write out your variable names


This is my over-commented counter-proposal:

function isEarlierDate(){

  return year &lt; currentYear || //Last year is in the past
         year == currentYear &amp;&amp; month &lt; currentMonth || //This year, earlier month is in the past
         year == currentYear &amp;&amp; month == currentMonth &amp;&amp; day &lt; currentDay || //..
         false; //This is clearly not an earlier date
}