GUI Components JavaScript DHTML




  Yahoo! Calendar Control - Multi-Select 2-up Implementation
  
  
  
  
  
  
  
  
    
  
  
    
  
    YAHOO.namespace("example.calendar");
    function init() {
      YAHOO.example.calendar.cal1 = new YAHOO.widget.Calendar2up("YAHOO.example.calendar.cal1","cal1Container");
      var customConfig = function() {
        this.Options.MULTI_SELECT = true;
      }
      
      YAHOO.example.calendar.cal1.setChildFunction("customConfig", customConfig);
      YAHOO.example.calendar.cal1.callChildFunction("customConfig");
      YAHOO.example.calendar.cal1.render();
    }
    YAHOO.util.Event.addListener(window, "load", init);
  
  


  
  
  
    

Calendar Control


  

  
    

Multi-Select 2-up Implementation


    

To allow for multiple selections on a 2-up Calendar, use the following code:


    
    var cal1;
    function init() {
      cal1 = new YAHOO.widget.Calendar2up("cal1","cal1Container");
      var customConfig = function() {
        this.Options.MULTI_SELECT = true;
      }
      
      cal1.setChildFunction("customConfig", customConfig);
      cal1.callChildFunction("customConfig");
      cal1.render();
    }
    
    

  

  
  


 
dp.SyntaxHighlighter.HighlightAll('code'); 


           
         
  
yui.zip( 3,714 k)