<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>
上記のコードは、1 つのカレンダーで複数の日付を選択できる YUI カレンダーを生成します。私が理解するのに苦労しているのは、そのデータをキャプチャしてその場でテキスト入力タグ内に配置する方法です。したがって、人が閉じるボタンをクリックすると、選択されたすべての日付が入力タグ内に取り込まれます。
提案?(コードサンプルは大歓迎です)