0

我使用 JQuery DatePicker 作为一个小日历仪表板,用“议程项目”(活动、办公室关闭、会议......)标记日期。

日期已标记并可单击,但现在我想在用户单击其中一个日期时导航到“日期详细信息”。

这是我到目前为止所拥有的,但我缺少(参见???)如何将所选日期附加到 Url.Action 方法:

    $(document).ready(function() {
        $("#eventCalendar").datepicker({
            numberOfMonths: 3,
            beforeShowDay: highlightDays,
            onSelect: function(date, instance){
                window.location = '<%= Url.Action("Items", "Calendar", new { date = ???}) %>';
            }
        });
        });
4

1 回答 1

1
window.location = '<%= Url.Action("Items", "Calendar") %>?date=' + encodeURIComponent(date);
于 2010-07-15T07:57:32.173 回答