GUI Components JavaScript DHTML




  Yahoo! Calendar Control - Date Restriction Example
  
  
  
  
  
  
  
  
  
  
  
  
  
    YAHOO.namespace("example.calendar");
    function init() {
      YAHOO.example.calendar.cal1 = new YAHOO.widget.Calendar("YAHOO.example.calendar.cal1","cal1Container","2/2006");
      YAHOO.example.calendar.cal1.addRenderer("2/28/2006",YAHOO.example.calendar.cal1.renderBodyCellRestricted);
      YAHOO.example.calendar.cal1.render();
    }
  
  


  
  
  
    

Calendar Control


  

  
    

Date Restriction Implementation


    

This example shows how to restrict selection of a specific date:



var cal1;
function init() {
  cal1 = new YAHOO.widget.Calendar("cal1","cal1Container");
  cal1.addRenderer("2/28/2006",cal1.renderBodyCellRestricted);
  cal1.render();
}

    

    
    
      
      

      
        reset|
        what's selected?
      
    
  

 
dp.SyntaxHighlighter.HighlightAll('code'); 



           
         
  
yui.zip( 3,714 k)