Skip to content

NullPointerException adding event in the MontSheetView #220

@MattTheCuber

Description

@MattTheCuber

Adding an event in the MonthSheetView through the context menu with click behavior is not set to PERFORM_SELECTION (the default) throws a NullPointerException.

Image
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: date
        at java.base/java.util.Objects.requireNonNull(Objects.java:246)
        at java.base/java.time.LocalDateTime.of(LocalDateTime.java:376)
        at java.base/java.time.ZonedDateTime.of(ZonedDateTime.java:267)
        at com.calendarfx.view.MonthSheetView.lambda$createContextMenu$3(MonthSheetView.java:142)

Simple workaround for now is this:

calendarView.getYearPage().getMonthSheetView().setClickBehaviour(ClickBehaviour.PERFORM_SELECTION);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions