fullcalendar와 함께 moment(). format()을 사용하려고합니다. 나는 달력에서 요소를 드래그하면이 오류가moment(). format() 및 fullcalendar : undefined가 함수가 아닙니다.
<script src="<?php echo ASSETS_URL; ?>/js/plugin/fullcalendar/lib/moment.js"></script>
<script> moment().format() </script>
<script type="text/javascript">
$('#calendar').fullCalendar({
header: hdr,
buttonText: {
prev: '<i class="fa fa-chevron-left"></i>',
next: '<i class="fa fa-chevron-right"></i>'
},
defaultView: "agendaWeek",
editable: true,
droppable: false, // this allows things to be dropped onto the calendar !!!
lang: 'it',
timeFormat: 'H(:mm)',
firstDay: 1,
drop: function (date, allDay) { // this function is called when something is dropped
events: [{
}],
eventDragStart: function(event, jsEvent, ui, view) {
ev_start=event.start.moment().format("dddd (d) DDD - D/MM/YY");
console.log(ev_start);
},
},
: catch되지 않은 형식 오류 :이 코드가 정의되지 않은 함수가되지
좀 디버그를 수행하고 오류가 순간에 의해 발생() .format() 누구든지 도와 드릴 수 있습니까?
당신의 모든 라인이 필요하지 않습니다. –
또한 라인이 없으면 오류가 있습니다. – Joe
lib를 제거하고이 CDN을 사용하십시오. –