react-native-big-calendar
react-native-big-calendar copied to clipboard
Add `onPress` handler to `more` labels on MONTH mode.
On click of more label, a modal should open to make additional/all events visible.
Hi @TechSaq
I was Facing same issue on my calendar but i resolve this issue by this.
There is one props onPressCell , by this props ypu will get cell date and after you can filter all events by this date and then you can show all those events by modal.
const handleOnPressCell = (date) => {
let selectedDate = getConvertedDate(date);
let filterEvent = events.filter((item) => {
return selectedDate === item?.date;
});
setTodaysEvents(filterEvent);
if (filterEvent.length > 1) {
setShowEventModal(true);
}
};
Hi @Subhash-Dhandhukiya
I am using onPressCell
to open Modal to add some events.
It will be better to have an onPress event for more text to display additional events in modal with some default implementation within the package and support to override the modal.
Sorry for the delay.
This should be implemented. It would be glad if you create a pull request for this. Thanks
Hi @acro5piano,
I will create a PR for this. I will show a default Modal to list additional events. I will also add support to override this default modal to make it more flexible.
Thanks
Thanks!
Hi, @acro5piano
I am working on this PR and implementation is done almost. I have added a callback function named onPressMoreLabel
with onPress
of moreLabel
.
I need suggestions from you, onPress
of moreLabel
, the library itself should show a popover with additional events or leave the implementation to the end user however they want to use it.
If the library itself should show a popover itself I might have to use some popover library.
Please suggest how you want me to proceed.
Thanks
@acro5piano, I also want to test the changes in my real device. Can you please help how can I test on a real device?
Thanks
@TechSaq Thank you very much!
I need suggestions from you, onPress of moreLabel, the library itself should show a popover with additional events or leave the implementation to the end user however they want to use it.
Can you proceed with the library itself should show a popover with additional events
for now?
If the library itself should show a popover itself I might have to use some popover library.
I prefer not to add dependency, especially for UI library. However, if it provides better quality and save implementation cost, go for it. Thanks!
I also want to test the changes in my real device. Can you please help how can I test on a real device?
I'll create a document for it.
@TechSaq Thank you very much!
I need suggestions from you, onPress of moreLabel, the library itself should show a popover with additional events or leave the implementation to the end user however they want to use it.
Can you proceed with
the library itself should show a popover with additional events
for now?If the library itself should show a popover itself I might have to use some popover library.
I prefer not to add dependency, especially for UI library. However, if it provides better quality and save implementation cost, go for it. Thanks!
I implemented a solution without adding any dependency but in storybook looks it is not rendering properly due to deviceWidth so I wanted to test the changes on a real device.
I also want to test the changes in my real device. Can you please help how can I test on a real device?
I'll create a document for it.
I found a solution for this by using the install-local
library. This adds local package as localDependencies
in package.json
and add the package to node_modules
but while importing I am getting error.
While writing a document for this please consider the Window system.
getConvertedDate
is it a predefined method to get the date list?
Hi @Subhash-Dhandhukiya
I am using
onPressCell
to open Modal to add some events.It will be better to have an onPress event for more text to display additional events in modal with some default implementation within the package and support to override the modal.
Hi, I need some help in this
Hi there,
I've been busy now for my own business. If you create a pull request for this, I'm happy to merge it. Thanks
Please send your full source code. I am unable to open modal on onPress
It's open source, so you can find them on your own.
any updates on this?