0
<script type="text/javascript">
YAHOO.util.Event.onDOMReady(function(){
YAHOO.dateSelects.exc = new YAHOO.widget.Calendar("exc","excContainer",
{ title:"Choose a date:", close:true, multi_select:true });
YAHOO.dateSelects.exc.render();
YAHOO.util.Event.addListener(
"excshowup",
"click",
YAHOO.dateSelects.exc.show,
YAHOO.dateSelects.exc,
true
);
});
</script>
<div class="calendarOuterContainer">
<div id="excContainer" class="calendarContainer"></div>
</div>
<a id="excshowup"><img src="/images/icons/calendar.png" /></a>
上述代碼生成一個YUI日曆,可以在一個日曆上選擇多個日期。我在解決問題時遇到的困難是如何捕獲這些數據並將其放在文本輸入標籤中。所以當一個人點擊關閉按鈕時,所有選擇的日期都會填充到輸入標籤中。從YUI日曆中獲取數據輸入字段:true
對此提出建議? (代碼示例非常感謝)
我對YUI不是很熟悉,你能否給我看一些代碼? – kylex 2010-06-16 17:18:48