react-native-big-calendar icon indicating copy to clipboard operation
react-native-big-calendar copied to clipboard

How to disable clickevent actions of the next month starting dates in current month

Open chinmay4github1987 opened this issue 2 years ago • 1 comments

Need to disable event press actions on the next month's dates in the current month.

chinmay4github1987 avatar Aug 25 '22 07:08 chinmay4github1987

Currently not possible. Feel free to open a pull request.

acro5piano avatar Aug 30 '22 05:08 acro5piano

Hey @acro5piano What do you think about this feature? I will take a look if it feels worth it.

charithAmila avatar Oct 09 '23 04:10 charithAmila

@charithAmila I think you can hide next month's events by adding a filtering logic. However, if it does not satisfy your needs, please go ahead! Thanks

acro5piano avatar Oct 09 '23 08:10 acro5piano

We can add a prop for disabling event-clicking so users can disable their events as they need.

interface ICalendarEventBase {
    start: Date;
    end: Date;
    title: string;
    children?: ReactElement | null;
    hideHours?: boolean;
    disabled?: boolean; // <-- disabled prop
}

charithAmila avatar Oct 09 '23 13:10 charithAmila

That sounds good!

acro5piano avatar Oct 09 '23 17:10 acro5piano

@acro5piano PR is ready for review. https://github.com/acro5piano/react-native-big-calendar/pull/938

charithAmila avatar Oct 11 '23 03:10 charithAmila

@charithAmila Thanks! Released on v4.5.0

acro5piano avatar Oct 14 '23 16:10 acro5piano