React-big-calendar: Add ability to remove link in the month day's date number

Created on 28 Jun 2016  路  3Comments  路  Source: jquense/react-big-calendar

So I'm using this calendar but don't have a day view, only month and week. The link in the date number in the month view (namely this <a> guy) doesn't make sense if there's no day view, so I'd like to add an option to remove it. I'm happy to post a PR, but can't think of a good prop name or type to add.

Most helpful comment

You can fix it with :

.rbc-date-cell > a{
  pointer-events: none;
}

This will disable the onclik on the days!

All 3 comments

I'm having an issue with this at present as well, we have no use for the day view and have restyled the calendar to make the day large and in the centre of the cell. But this then means the onSelectSlot event doesn't fire when you click on the numbers. Ideally I'd like to be able to specify an event for this like onSelectDay or something similar, I could then just set it to the same function.

I notice it does fire the onNavigate event, but this is not distinguishable from when the user clicks the next button in the top nav, so I can't alter the behaviour.

You can fix it with :

.rbc-date-cell > a{
  pointer-events: none;
}

This will disable the onclik on the days!

Thanks, we were able to work around using z-index to push the a tag behind the cell so the cell was always clicked. I still think it would be great if you could control the event fired by clicking the <a> tag specifically though.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kromit picture kromit  路  4Comments

KatiaPosPago picture KatiaPosPago  路  3Comments

connercms picture connercms  路  3Comments

mathieusanchez picture mathieusanchez  路  4Comments

martinnov92 picture martinnov92  路  3Comments