여러 개의 전체 일정을 관리하지만 같은 페이지에 여러 개의 캘린더가 있기 때문에 내가 몇 가지 합병증으로 실행하고 있습니다.내가 <p>jQuery를</p>의 멋진 <a href="http://arshaw.com/fullcalendar/" rel="nofollow">fullcalendar</a> 플러그인을 사용하고
각 일정은 자체 ID가있는 <div>
안에 있으며 "글로벌 범위"에서 적절한 일정을 식별하는 것은 매우 간단합니다.
내 문제는 실제로 사용자가 캘린더를 선택할 때 트리거되는 select
과 같은 콜백 함수 내에서 현재 캘린더에 대해 my_custom_val
을 얻는 중입니다. 일반적으로 당신은 내가 가지고있는 이벤트와 같은 이벤트 이후에 모든 이벤트에 대해 이벤트 생성 대화 상자를 표시 할 수 있습니다. 여기에 내가 설정의 캘린더에 전달 된 옵션 $(calendar_id).data("fullCalendar").options.my_custom_option;
발견 할 수 있지만 문제가 있음을 발견했다 http://arshaw.com/fullcalendar/docs/selection/select_callback/
이 콜백에 대한 문서입니다, 난 선택 콜백 내에서 calendar_id
을 알아낼 수 없습니다 . 어떤 제안이 크게 감사
$(calendar_id).fullCalendar({
my_custom_val: my_custom_val,
select: function(start, end, allDay){
// Process selection...
// need to access my_custom_val here
// from the global scope, if i know calendar_id, i can simply do
// $(calendar_id).data("fullCalendar").options.my_custom_option
}
});
, 감사 CALENDAR_ID 안에 무엇이
jquery 선택기이므로 문자열 (http://api.jquery.com/category/selectors/) –