Page 1 of 1

P-Schedule dayRender

Posted: 15 May 2017, 21:19
by jayendran
Can any one implemented DayRender? if so please pass me the example.

I tried this in Angular 2.0 (typeScript) but its not working. Date and cell are not identified.

this.dayRender(date, cell) {
cell.css("background-color", "yellow");
}

Re: P-Schedule dayRender (IMP)

Posted: 17 May 2017, 22:24
by jayendran
Any help will be appreciated. Any one implemented dayRender?

if not how do we set valid date range in the calendar?

Re: P-Schedule dayRender

Posted: 18 May 2017, 03:13
by sudheer
In case of attributes, PrimeNG schedule just passes all the config details to the full calendar options. It should work the same way as full calendar dayrender function.

Re: P-Schedule dayRender

Posted: 18 May 2017, 05:44
by jayendran
Full Calendar documentation has this.

function( date, cell ) { }.

How can i get access to parameters (date and cell) in Angular type script file?

Re: P-Schedule dayRender

Posted: 18 May 2017, 07:56
by sudheer
You just need to call the function like [dayRender]="dayRender" .That's it.

Re: P-Schedule dayRender

Posted: 16 Nov 2017, 11:48
by biven
I use Angular 4 and "primeng": "^4.1.0". Just using

Code: Select all

[dayRender]="dayRender"
...
dayRender(date: any, cell: any): void {
    
  }
doesn't get any result. Both params are undefined. How should it work?

Re: P-Schedule dayRender

Posted: 17 Nov 2017, 16:53
by biven
biven wrote:
16 Nov 2017, 11:48
I use Angular 4 and "primeng": "^4.1.0". Just using

Code: Select all

[dayRender]="dayRender"
...
dayRender(date: any, cell: any): void {
    
  }
doesn't get any result. Both params are undefined. How should it work?
I found my issue. Documentations says: This callback lets you modify day cells that are part of the month, basicWeek, and basicDay views, but i tried to use it with agendaWeek and agendaDay. So, additional question: does any mechanism have for handling cells rendering on agendaWeek and agendaDay views?

Re: P-Schedule dayRender

Posted: 04 Feb 2019, 18:25
by giammanet
i use primefaces in JSF projects.

in my case, suppose that i've declared my schedule this way:

<p:schedule id="schedule" .... (other params..)

in a javascript block i call this:


$("#schedule").fullCalendar({
dayRender: function (date, cell) {
cell.css("background-color", "red");
}
});

Re: P-Schedule dayRender

Posted: 05 Feb 2019, 09:20
by yigitfindikli
p-schedule is deprecated. You can use p-fullCalendar. You can more info in http://primefaces.org/primeng/#/fullcalendar .