 //不显示当前日期之前的日期
 function dateStatusNotShowBeforeDay(date) 
 {	
 	var today = new Date();
	if(today.getFullYear()>date.getFullYear())
	{
    	return true;   // true says "disable"
    }
    else if(today.getFullYear()==date.getFullYear())
    {
    	if(today.getMonth()>date.getMonth())
        {
         	return true;
        }
		else if(today.getMonth()==date.getMonth())
	    {
	    	if(today.getDate()>date.getDate())
	        {
	        	return true;
	        }
		}
    }
    return false;
}

 //不显示当前日期之后的日期
 function dateStatusNotShowAfterDay(date) 
 {	
 	var today = new Date();
	if(today.getFullYear()<date.getFullYear())
	{
    	return true;   // true says "disable"
    }
    else if(today.getFullYear()==date.getFullYear())
    {
    	if(today.getMonth()<date.getMonth())
        {
         	return true;
        }
		else if(today.getMonth()==date.getMonth())
	    {
	    	if(today.getDate()<=date.getDate()-1)
	        {
	        	return true;
	        }
		}
    }
    return false;
}

//显示当前日期之后给定天数的日期
 function dateStatusNotShowBeforeTodayAndAfterDays(date) 
 {	
 	var today = new Date();
	if(today.getFullYear()>date.getFullYear())
	{
    	return true;   // true says "disable"
    }
    else if(today.getFullYear()==date.getFullYear())
    {
    	if(today.getMonth()>date.getMonth())
        {
         	return true;
        }
		else if(today.getMonth()==date.getMonth())
	    {
	    	if(today.getDate()>=date.getDate())
	        {
	        	return true;
	        }
		}
    }
    
    if(daysBetween(date,today)>30)
     	return true;
    else
	    return false;
}

//求两个时间的天数差
function daysBetween(DateOne,DateTwo)   
{
    var cha=((Date.parse((DateOne.getMonth()+1)+'/'+DateOne.getDate()+'/'+DateOne.getFullYear())- Date.parse((DateTwo.getMonth()+1)+'/'+DateTwo.getDate()+'/'+DateTwo.getFullYear()))/86400000);    
    return Math.abs(cha);   
}