Our powerful JS Calendar component


Post by anthony.dasre »

Hello everyone,

I have used the bryntum calendar with the attributes as follow:


{
	 date : new Date(),
	  modes : {
	        // Let's not show the default views
	        day    : null,
	        week   : null,
	        month : null,
	        year   : null,
	        agenda : null,
	         weekResources : {
	            type               : 'resource',
	            title              : 'Semaine',
	            resourceWidth      : '30em',
	            hideNonWorkingDays : true,
	            view : {
	            	nonWorkingDays : null,
                    dayStartTime : 8,
                    dayEndTime   : 20,
	                tools : {
	                    close : {
	                        cls     : 'b-fa b-fa-times',
	                        tooltip : 'Filtrer cette ressource',
	                        handler() {
	                            const
	                                calendar       = this.up('calendar'),
	                                resourceFilter = calendar.widgetMap.resourceFilter,
	                                resource       = this.resource;

                            resourceFilter.selected.remove(resource);
                        }
                    }
                },
                eventRenderer : ({ eventRecord, renderData }) => {
                	return E2dPlanning_CalendarLibelle(eventRecord);
                }
            },
            meta : resource => resource.title
        }, monthResources : {
            type               : 'resource',
            title              : 'Mois',
            resourceWidth      : '30em',
            hideNonWorkingDays : false,
            view : {
                type : 'monthview',
                nonWorkingDays : null,
                    dayStartTime : 8,
                    dayEndTime   : 20,
				eventRenderer : ({ eventRecord, renderData }) => {
					return E2dPlanning_CalendarLibelle(eventRecord);
                }
            },

            meta : resource => resource.title
        },
        dayResources : {
            type               : 'resource',
            title              : 'Jour',
            resourceWidth      : '30em',
            hideNonWorkingDays : false,
            
            view : {
                nonWorkingTime : true,
                type : 'dayview',
                nonWorkingDays : null,
                    dayStartTime : 8,
                dayEndTime   : 20,
                eventRenderer : ({ eventRecord, renderData }) => {
                	return E2dPlanning_CalendarLibelle(eventRecord);
               }
            },
           
            meta : resource => resource.title
        }
}
}
	       	     

When I test the calendar, the date is January 5th. So in the calendar, it should show the week of January 5th in the 'weekResources. However, it displays the week of December 25th to December 31st.

img1.png
img1.png (61.01 KiB) Viewed 824 times

In "dayResources " and "monthResources ", the date is displayed correctly.

img2.png
img2.png (32.89 KiB) Viewed 824 times
img3.png
img3.png (32.42 KiB) Viewed 824 times

Can someone help me?
Thanks a lot


Post by tasnim »

Hi,

I'm not able to reproduce the issue, I tested it here https://bryntum.com/products/calendar/examples/resourceview/ with your code.
Could you please provide the required steps to reproduce the issue or a runnable test case so we can debug it?

Please make sure you're using the latest version


Post by Animal »

There must be some code in your app which affects it.

Here is your code with formatting cleaned up, and removing the renderers which you did not include: https://codepen.io/Animal-Nige/pen/zYbqOpB?editors=0010

As you can see, the date is as requested.


Post Reply