Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在我的网站主页上设置了一个 ui 日期选择器和一个单独的事件页面,其中包含我的 FullCalendar 充满事件。我的问题:是否可以单击日期选择器日期并将您链接到活动页面并在 FullCalendar 上显示选定的日期视图?
任何帮助表示赞赏。
当然有可能。
使用托管日期选择器的change()函数<input>来读取选定的值并使用日期作为查询字符串参数导航到目标页面。
change()
<input>
如果日期选择器未绑定到事件,则可以使用<input>该事件。onSelect
onSelect
$(function() { $("#datepicker").datepicker({ onSelect: function(dateText) { window.location = "http://example.com/events?date=" + dateText; } }); });