rem:  document.getElementById("start-date-picker").value = window.opener.document.getElementById("view-deck").selectedPanel.startDay.jsDate; document.getElementById("end-date-picker").value = window.opener.document.getElementById("view-deck").selectedPanel.endDay.jsDate;   var firstFocus = document.getElementById( "title-field" ).focus(); 
add:  var theView = window.opener.currentView(); document.getElementById("start-date-picker").value = theView.startDay.jsDate; document.getElementById("end-date-picker").value = theView.endDay.jsDate; 
context: function loadCalendarPrintDialog(){    // set the date to the currently selected date    document.getElementById("start-date-picker").value =         window.opener.document.getElementById("view-deck").selectedPanel.startDay.jsDate;    document.getElementById("end-date-picker").value =         window.opener.document.getElementById("view-deck").selectedPanel.endDay.jsDate;    // start focus on title    var firstFocus = document.getElementById( "title-field" ).focus();    // Get a list of formatters    var contractids = new Array();    var catman = Components.classes["@mozilla.org/categorymanager;1"]                           .getService(Components.interfaces.nsICategoryManager);    var catenum = catman.enumerateCategory('cal-print-formatters');    // Walk the list, adding item to the layout menupopup    var layoutList = document.getElementById("layout-field");    while (catenum.hasMoreElements()) {        var entry = catenum.getNext();        entry = entry.QueryInterface(Components.interfaces.nsISupportsCString);        var contractid = catman.getCategoryEntry('cal-print-formatters', entry);        var formatter = Components.classes[contractid]                                 .getService(Components.interfaces.calIPrintFormatter);        // Use the contractid as value        layoutList.appendItem(formatter.name, contractid);    }    layoutList.selectedIndex = 0;    opener.setCursor( "auto" );    self.focus();}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/0f89150b83c8e749bd8ff9223f8103315554b1c0/printDialog.js/buggy/calendar/resources/content/printDialog.js