-1
Fullcalendar에 datepicker 범위가 있습니다. datepicker로 날짜를 선택할 수있는 게시물을 보았습니다. 그러나 사용자가 시작 날짜와 종료 날짜를 선택할 수 있기를 바랍니다.날짜 범위 선택기가있는 Fullcalendar
내 fullcalendar는 다음 그림과 같다, 나는 붉은 광장에 datepickers을 추가하고 싶습니다.
이
내가 사용하고 코드입니다. 어떻게/어디서 데이트 피커를 추가 할 수 있습니까?<script>
$(document).ready(function() {
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
defaultDate: '2016-09-12',
navLinks: true, // can click day/week names to navigate views
selectable: true,
selectHelper: true,
select: function(start, end) {
var title = prompt('Event Title:');
var eventData;
if (title) {
eventData = {
title: title,
start: start,
end: end
};
$('#calendar').fullCalendar('renderEvent', eventData, true); // stick? = true
}
$('#calendar').fullCalendar('unselect');
},
eventClick: function(event, element) {
event.title = prompt('Event Title:',event.title);
$('#calendar').fullCalendar('updateEvent', event);
},
editable: true,
eventLimit: true, // allow "more" link when too many events
});
$('#datepicker').datepicker({
inline: true,
onSelect: function(dateText, inst) {
var d = new Date(dateText);
$('#fullcalendar').fullCalendar('gotoDate', d);
}
});
});
</script>
<style>
body {
margin: 40px 10px;
padding: 0;
font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
font-size: 14px;
}
#calendar {
max-width: 900px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='calendar'></div>
<div id='datepicker'></div>
</body>
무엇을 시도 했습니까? 왜 그게 효과가 없었어? 당신이 직면 한 문제는 무엇입니까? 당신의 코드는 어디에 있습니까? [최소한의 완전하고 검증 가능한 예제를 만드는 방법] (http://stackoverflow.com/help/mcve) –
@milz 내 질문을 이미 편집했습니다. – zuma
jquery datepicker 워드 프로세서에서 이것을 찾지 못하셨습니까? https://jqueryui.com/datepicker/#date-range. 구글 검색에서 3 초가 밝혀졌습니다. – ADyson