Using onViewChanged to change custom header dynamic values causes appointments to hide

I tried using my own custom header in 1-day view of calendar but the onViewChanged causes appointments to hide and when I comment the onViewChanged code , appointments re-appears but the onChange functionality doesn't work.


4 Replies

IR Indumathi Ravichandran Syncfusion Team September 29, 2021 10:25 AM UTC

Hi Afaq, 
 
Thank you for contacting Syncfusion support. 
 
Regarding Query: Using onViewChanged to change custom header dynamic values causes appointments to hide 
 
Based on the shared information, we have checked the mentioned issue “Custom header hides the Flutter Calendar appointment” and it was working fine as expected from our end. We have prepared the simple sample for the same. Also, we have attached the tested video for the same. Please find the sample and video from the following link. 
 
Sample link: 
 
Please check the sample and let us know if you still facing the same issue? If not, please modify the sample based on your scenario and revert us with following details, 
 
1.       Issue reproducing video. 
2.       Flutter Calendar version 
 
 It will be helpful for us to check on it and provide you solution at the earliest. 
 
Regards, 
Indumathi R 



AF Afaq October 4, 2021 02:20 PM UTC

https://drive.google.com/file/d/1oDm7gTxb4cgKIOGl4pWKOwozzpqHejcE/view?usp=sharing


Please finds the attached project containing syncfusion calendar widget in flutter. i reproduced the issue.



IR Indumathi Ravichandran Syncfusion Team October 5, 2021 01:15 PM UTC

Hi Afaq, 
 
Thank you for the update. 
 
We have already found and fixed the mentioned issue “Appointments are not added to the Flutter Calendar while using custom header nonWorkingDays property”. We will include the issue fix in our upcoming Weekly release package, which is expected to be rolled out by October 12, 2021 and let you know once the release rolled out. We appreciate your patience until then. 
 
As of now kindly use the below code snippet for resolving issue. 
 
Code snippet:

 
onViewChanged: (details) { 
  if (nextDay == 
          _controller.displayDate!.add(Duration(days: 1)) && 
      prevDay == 
          _controller.displayDate!.add(Duration(days: -1))) { 
    return; 
  } 
  SchedulerBinding.instance!.addPostFrameCallback((duration) { 
    setState(() { 
      nextDay = _controller.displayDate!.add(Duration(days: 1)); 
      prevDay = _controller.displayDate!.add(Duration(days: -1)); 
      filterSlots(prevDay, _controller.displayDate!, nextDay); 
    }); 
  }); 
} 
  
We hope that this helps you. Please let us know if you need further assistance. 
 
Regards, 
Indumathi R 



IR Indumathi Ravichandran Syncfusion Team October 12, 2021 12:57 PM UTC

Hi Afaq, 
 
Thank you for your patience. 
 
We have included the issue fix for “Appointments are not added to the Flutter Calendar while using custom header nonWorkingDays property” in our latest Weekly Nuget package version 19.3.45. Kindly update to the latest version for resolving this issue. 
 
Also please find the latest version from the following link. 
 
 
We hope that this helps you. Please let us know if you need further assistance. 
 
Regards, 
Indumathi R 


Loader.
Up arrow icon