How to change the cursor pointer on fullcalendar?

佐手、 提交于 2019-12-13 13:11:46

问题


I'm using fullCalendar plugin for my project. I noticed that when I set the "editable: " into false, the cursor hover on the events becomes default instead of staying as a pointer cursor. How do I change this? Thanks!


回答1:


This should do the trick:

.myCalendar {
    cursor: pointer;
}

Using the proper css selector instead of .myCalendar, of course.
Looking at this example calendar, you're probably looking for .fc-event, to preserve the pointer when hovering over calendar events:

.fc-event{
    cursor: pointer;
}



回答2:


Add the following CSS.

.fc-content {
    cursor: pointer;
}

div.fc-content wraps the calendar cells, so adding cursor: pointer; to .fc-content will produce the desired behavior.

But is that really desired?

In general convention cursor:pointer is used for any clickable element.




回答3:


I noticed that if you just set editable to true then it will display the finger pointer on hover. I'm not sure why you would even want it to set it to false if you intend to let the user click an event.

So simply set the editable value to true during initialization:

$('#calendar').fullCalendar({
  editable: true
});


来源:https://stackoverflow.com/questions/25154084/how-to-change-the-cursor-pointer-on-fullcalendar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!