question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dayRender not working like resourceRender

See original GitHub issue

Im using @fullcalendar/angular and ‘@fullcalendar/core’. And dayRender is not working for me. it doesnt matter if I console.log(event) or try to manipulate te object by giving it a new backgroundcolor. eventClick, datesRender and resourcerender ARE working like I would expect dayRender to work.

<full-calendar 
.......
[events]="events"
`(eventClick)="eventClick($event)"`
(datesRender)="datesRender($event)"
(dayRender)="dayRender($event)"
(resourceRender)="resourceRender($event)"
>
</full-calendar>
dayRender(model: any) {
    model.el.style.backgroundColor = 'blue';
    console.log(model);
}

 resourceRender(model: any) {
   model.el.style.backgroundColor = 'blue';
   console.log(model);
}

I’m using the resourceTimelinePlugin plugins: [bootstrap, resourceTimelinePlugin, interactionPlugin]

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
therichpostajaycommented, Jul 1, 2020

Try this: dayCellContent : { html: ‘Your Text’ },

This helps to add html like dayrender.

THANKS

0reactions
amirul1000commented, Apr 7, 2022

ngAfterViewInit(){ // Your CSS as text var styles = .fc td, .fc th { vertical-align: top; padding: 0; height: 100px; } a{ color:#3d1cba; }

let styleSheet = document.createElement("style");
styleSheet.innerText = styles;
document.head.appendChild(styleSheet);


let arrTD = document.querySelectorAll('td.fc-timeline-slot');
let arrTR= document.querySelectorAll('td.fc-timeline-lane.fc-resource');
let arrInject= document.querySelectorAll('td.fc-timeline-lane.fc-resource>div.fc-timeline-lane-frame');
console.log(arrTR);

let k=-1;
arrTR.forEach(eachTR => {
    let i=1;
    let str = '';
    k++;

    let data_resource_id= eachTR.getAttribute('data-resource-id');
    console.log(data_resource_id);

    arrTD.forEach(eachTD => {          
        let  k=100*(i-1);
        i=i+1;
        let data_date= eachTD.getAttribute('data-date');
        console.log(data_date);

        let data_resource_id= eachTR.getAttribute('data-resource-id'); 
        console.log(data_resource_id);

        str = str + '<span data-date="'+data_date+'" data-resource-id="'+data_resource_id+'" class="plus_icon" style="position:relative;top: 0px; left: '+k+'px !important;width:500px;height:500px;z-index:3;-moz-border-radius:100px;border:1px  solid #ddd;-moz-box-shadow: 0px 0px 8px  #fff;">+</span>';          
  
     
  });
    arrInject[k].innerHTML=str;

});


let elementList = this.elRef.nativeElement.querySelectorAll('span.plus_icon');
for(let i=0;i<elementList.length;i++){   
 elementList[i].addEventListener('click', this.plusClick.bind(this));
}

}

Read more comments on GitHub >

github_iconTop Results From Across the Web

dayRender stops working when Fullcalendar is using view
If I use the view timeGridWeek it works just fine. I will leave here the json options I'm working with, but what I'd...
Read more >
resourceRender - Docs v4 - FullCalendar
A hook for manipulating a resource's DOM. function( renderInfo ). The renderInfo argument is an object with the following properties: resource. The Resource ......
Read more >
@fullcalendar/resource-common | Yarn - Package Manager
FullCalendar Scheduler. A premium add-on to FullCalendar for displaying events and resources. Project website and demos · License · Changelog · Contributing ...
Read more >
ng-fullcalendar-scheduler - npm package - Snyk
Looks like ng-fullcalendar-scheduler is missing a security policy. ... Snyk to stay up to date on security alerts and receive automatic fix pull...
Read more >
UNPKG - @fullcalendar/vue
5, - no longer expose component as 'fullcalendar' when used globally ... 12, [core-5822]: https://github.com/fullcalendar/fullcalendar/issues/5822.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found