How to get additional data and display in scheduler's date header

Hi,

I want to display appointments and additional info in date header such as weather just like the one in the demo here:

ASP.NET Core Scheduler Date Header Example - Syncfusion Demos


However, in the demo, weather data is hard coded. For actual usage scenario, where should I put ajax function to get the weather data for the current view?

For example in Month view, I want to get weather data for current month and when user navigate to other month, get weather data for the selected month and render it in date header.

I've tried using navigating event to get weather data from server and renderCell event to add the weather info to date header but renderCell finished first before weather data is received in navigating event.


1 Reply

PN Praveenkumar Narasimhanaidu Syncfusion Team November 24, 2021 02:12 PM UTC

Hi RWEM, 

Greetings from Syncfusion support..! 

We have validated your reported problem “I've tried using navigating event to get weather data from server and renderCell event to add the weather info to date header but renderCell finished first before weather data is received in navigating event” at our end and suggest you use actionBegin event instead of navigating event. Please find the below code snippet. 

function ActionBegin(args) { 
    if (args.requestType === 'viewNavigate') { 
            // This block is execute before view navigation 
           // And you can get current view through scheduleObj.currentView  
        } 
 } 


You can also customize moth cells with scheduler cellTemplate option. For more information, please refer following UG link. 

Kindly try the above solution and if the problem persists still at your end, please share following details to further validate and provide a prompt solution. 
  • Share your scheduler package version
  • What type of date you need to render on cells? If possible, share us a sample data
  • Share your scheduler code snippets
  • Share any issue reproducing sample(if possible)
Regards, 
Praveenkumar 



Loader.
Up arrow icon