2013-05-29 14 views

回答

0

如果我沒有記錯的話,應該是這個樣子

require([ 
    "dijit/Calendar", 
    "dojo/date", 
    "dojo/domReady!" 
], function(Calendar, date){ 
    new Calendar({ 
     value: new Date(), 
     isDisabledDate: function(d){ 
      var d = new Date(d); 
      d.setHours(0, 0, 0, 0); 

      var today = new Date(); 
      today.setHours(0, 0, 0, 0); 

      return date.difference(d, today, "day") > 0; 
     } 
    }, "mycal"); 
}); 
+0

非常感謝!這有幫助! –

相關問題