2011-07-06 33 views

回答

2

你仍然需要日曆本身的股利,但隨後附上日曆顯示選項輸入。

<%: Html.TextBox("sample")%>  
<div id="calendar"></div> 
$("#calendar").wijcalendar({ 
    popupMode: true, 
    selectedDatesChanged: function() { 
     var selDate = $(this).wijcalendar("getSelectedDate"); 
     if (!!selDate) $("#sample").val(selDate.toDateString()); 
    } 
}); 

$("#sample").click(function() { 
     $("#calendar").wijcalendar("popup", { 
      of: $("#sample"), 
      offset: '0 2' 
     }); 
    }) 
}); 
+0

你是不是要用雙「!」來寫「if(!! selDate)」? – radbyx

相關問題