Our powerful JS Calendar component

Post by codevlabs »

Dear Support,

I am testing the calendar list view mode. When I set the default mode to 'list', the view doesn't load. When I navigate to another mode such as year and back to list mode, the list loads fine. It only fails to load when set at the start. This error only happens with list as the other modes work fine.

Kindly assist.

	modes : {		
		list : true	     
ngAfterViewInit(): void {
        let calendar = this.calendarComponent.instance;		
	calendar.readOnly = true;

	let crudConf:any = calendar.crudManager.config;			
	crudConf.transport.load.headers.Authorization = "Bearer " + this._const.access_token;
	calendar.mode = 'list';  // Doesn't work	
	//calendar.mode = 'year'; // WORKS FINE		 


Post by mats »

Are you able to share a small test case with us?

Post by Animal »

Why set the mode dynamically? Why not just configure it?

Post by codevlabs »

I simplified the code and am using configuration. Using the same code and config, in Angular the list loads at the start but on Ionic it doesn't. On ionic switching away from list and back to list loads the list fine. The issue is is only on load.

			[modes] = "calendarConfig.modes!"
			[mode] = "calendarConfig.mode"
			[crudManager] = "calendarConfig.crudManager!"
date : new Date(2024, 1, 9),

modes : {		
	list : true			     

mode: 'list',

 crudManager : {
	transport : {
		load : {
			url : environment.baseURL + '/getCalendar.php',
			fetchOptions: { credentials: "omit" },
			headers: {
				'Authorization': `Bearer ` + 'eyJ0eXAiOiJKKDqgzZ_1aslg'
    	autoLoad : true

Any support on this would be appreciated.

Post by sergey.maltsev »


Could you please provide Ionic 7 app which we can build and test?
It is quite hard to give an advice on the portions of code given above.

Post by codevlabs »

Please find a demo ionic project attached. Thanks.

(158.19 KiB) Downloaded 7 times

Post by Animal »

I've unpacked that and done npm i (couple of warnings)

How do I run the app?

Post by codevlabs »

The app is a starter Ionic app. I just added the calendar as per doc instructions.

Use Ionic serve to run

Post by Animal »

Screenshot 2024-02-11 at 09.51.56.png
Screenshot 2024-02-11 at 09.51.56.png (9.45 KiB) Viewed 132 times

I must need something more than is there.

Post by codevlabs »

It appears that the Ionic framework may not be properly configured on your system. Would it be possible for a member of the Ionic team to assist with this, please? Thanks

Post Reply