Comments (9)
made some progress on this
.rbc-off-range { background: white; border-left: 1px solid #DDDDDD; border-right: 1px solid #DDDDDD; position: absolute; width: 100%; height: 100%; opacity: 1; color: white; z-index: 10000; }
Please check..
from react-big-calendar.
.rbc-off-range {
background: #fff;
opacity: 1;
color: white;
z-index: 10000;
button {
display: none;
}
}
This seems to work for me.
from react-big-calendar.
You can visually hide the months buy adjusting the styling of the rbc-off-range
class, but there is no option to not have events visible on those dates if they extend to them.
from react-big-calendar.
Please do not close the issue.
I can hide dates using overwriting rbc-off-range
. My real question is, How to hide event.
Please mark as bug or improvement as this is needed.
May be if you can provide me some pointers, I can make pull request.
from react-big-calendar.
Hi there, sorry if I closed this a bit soon. I'm not sure what you are looking for in this case...You want to hide any events that extend into the previous month? I appreciate your suggestion, but I don't think we will ever make such an enhancement as it has (I think) UX problems, and breaks expectations. Moreso tho, supporting that behavior would dramatically complicate the code base for not a ton of gain.
If you want to have such a behavior in your app then I suggest you sort and filter/map your events to only contain events (or parts of events) that are fully contained in the given month, and then pass that to the calendar. You can use the onNavigate
and onView
events to know when and what date range you are looking at. And use the eventPropGetter
to style edge events. Alternatively, remember that startAccessor
and endAccessor
can be functions so you can return any date you want from them, such as the 1st or last of the month for events that overlap.
overall I think what you want to do can be accomplished already using the existing API, without too much complexity.
from react-big-calendar.
I am able to hide only the first date. I think you can modify it to make it a proper solution !!
from react-big-calendar.
from react-big-calendar.
from react-big-calendar.
Hi I made a quick hack to do this
hideAllUnwanted(){
try{
var old = ReactDOM.findDOMNode(this).querySelectorAll(".fix-calendar-offset");
[...old].forEach(function( node ) {
node.parentNode.removeChild( node );
});
var elements = ReactDOM.findDOMNode(this).querySelectorAll(".rbc-off-range");
[...elements].forEach((el) => {
var elData = el.getBoundingClientRect();
var width = parseInt(elData.width);
var node = document.createElement("DIV");
node.style.width = (width + 1) + "px";
node.setAttribute('class', 'fix-calendar-offset');
el.appendChild(node);
});
}catch(ex){
}
}
componentDidUpdate(){
this.hideAllUnwanted();
}
componentDidMount() {
this.hideAllUnwanted();
}
.fix-calendar-offset {
/*width: 52px;*/
height: 300px;
position: absolute;
background: #FFFFFF;
margin-left: 1px;
border-right: 1px solid #E4E4E4;
}```
from react-big-calendar.
Related Issues (20)
- Incorrect Calendar display and missing dates in 'month' view when using dayjsLocalizer - March 2024 HOT 3
- Drag selection not working properly when moving upwards HOT 3
- Incorrect date passed to onSelectSlot (and onSelecting) HOT 7
- [Accessibility] "Ensure elements with ARIA role that require child roles contain them HOT 1
- Wrong possition for current time indicator HOT 1
- Node modules manipulation for custom week view HOT 2
- CSS inside the component HOT 1
- Limit events shown per day in calendar (Month view) HOT 1
- For Month view event does not come back if its undroppable (e.g we try to move it outside the calender) HOT 3
- Detecting right Click or any Click inGeneral HOT 1
- onSelectSlot start date is from the start of the day, not where I start the selection (in week view) HOT 11
- Deprecated link found within the repository HOT 5
- Since 1.11.2, in week view, clicking anywhere in the calendar selects the last day of the week HOT 2
- Translating README file to French for global reach
- Example for custom `eventWrapper` component on a `DndResizableCalendar` HOT 2
- Translate the CONTRIBUTING Guidelines into Arabic for Enhanced Accessibility
- onNavigate Link Not Functioning Correctly in Date Documentation HOT 1
- Keydown triggers the selectDates function HOT 3
- Error in 'Understanding Dates' Guide: Link Issue with 'props' Word
- selectDates function is returning the end date as one day after the selected date
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-big-calendar.