我在FullCalendar (http://fullcalendar.io)页面的正下方添加了一个datePicker (http://www.eyecon.ro/datepicker/)。
如何将此日期选择器附加到fullcallendar标题上的自定义按钮,当按下该按钮时,日期选择器将显示出来?
谢谢
更新:添加代码
编辑:代码已更新
到目前为止,我编写的代码是: JS:
$(function () {
//...some code.....
//fullcalendar
$('#calendar').fullCalendar({
//...options
header: {
left: 'title today',
center: '',
right: 'prevMonth prev myCustomButton next nextMonth'
},
customButtons: {
myCustomButton: {
text: ' ',
click: function () {
$('#date').DatePicker({
flat: true,
date: currentDate,
current: currentDate,
calendars: 2,
starts: 1,
onChange: function (formated, dates) {
$('#calendar').fullCalendar('gotoDate', formated);
}
});
}
},
//...other buttons
},
//....other options....
});//fullcalendar
});//$
ASP:
<div>
<div id='calendar'></div>
</div>
<div>
<p id="date"></p>
</div>
https://stackoverflow.com/questions/38062449
复制相似问题