Skip to content

Commit

Permalink
Added commented out simple sample code for resource rendering hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanuebe committed Sep 25, 2023
1 parent 53cffb9 commit 085ff27
Showing 1 changed file with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ protected FullCalendar createCalendar(JsonObject defaultInitialOptions) {
.withScheduler(Scheduler.GPL_V3_LICENSE_KEY)
.build();

((FullCalendarScheduler) calendar).setResourceAreaWidth("15%");
((FullCalendarScheduler) calendar).setSlotMinWidth("100");
((FullCalendarScheduler) calendar).setResourcesInitiallyExpanded(false);
FullCalendarScheduler scheduler = (FullCalendarScheduler) calendar;
scheduler.setResourceAreaWidth("15%");
scheduler.setSlotMinWidth("100");
scheduler.setResourcesInitiallyExpanded(false);

calendar.setNowIndicatorShown(true);
calendar.setNumberClickable(true);
Expand All @@ -73,7 +74,7 @@ protected FullCalendar createCalendar(JsonObject defaultInitialOptions) {
getToolbar().setTimezone(event.getTimezone());
});

((FullCalendarScheduler) calendar).setEntryResourceEditable(false);
scheduler.setEntryResourceEditable(false);

// calendar.setEntryClassNamesCallback("function(arg) {\n" +
// " return [ 'hello','world' ]\n" +
Expand All @@ -93,6 +94,18 @@ protected FullCalendar createCalendar(JsonObject defaultInitialOptions) {
// + " }"
// + " }"
// + "}");
//
// scheduler.setResourceLabelContentCallback(
// "function(arg, createElement) {" +
// " console.warn('hello');" +
// " return 'Hello';" +
// "}");
//
// scheduler.setResourceLaneContentCallback(
// "function(arg, createElement) {" +
// " console.warn('world');" +
// " return 'World';" +
// "}");

createTestEntries(calendar);

Expand Down

0 comments on commit 085ff27

Please sign in to comment.