We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Why isnt Scheduler populated with appointments from my Mongodb server (using Mongoose)?

I am building a MEAN-application with Scheduler. Creating appointments and saving them to the mongodb database works flawlessly, hoewever, the schedulers remains empty while there are many appointments in the database. This is in my index.js


app.post("/GetData", (req, res) => {
Event.find({}, function(err, events) {
res.send(events);
});
});

I see in my Network tab in my browsers developer tools that when the Scheduler is loaded, the 'getData returns a '200 OK' with the request
Running the 'GetData' endpoint in postman gives me these documents:

 {
        "_id""5dc835d6wefw835250ab4456",
        "startTime""Tue Nov 12 2019 12:00:00 GMT+0100 (GMT+01:00)",
        "endTime""Tue Nov 12 2019 12:30:00 GMT+0100 (GMT+01:00)",
        "subject""Work",
        "klant""Simon",
        "km"43,
        "business"true,
        "location""Amsterdam",
        "description""test",
        "__v"0
    }

How does it come that I dont see the appointments in the scheduler?

3 Replies

YL Youssef Lakdime November 10, 2019 11:34 AM

private dataManager: DataManager = new DataManager({
url: 'http://localhost:8000/GetData',
crudUrl: 'http://localhost:8000/BatchData',
adaptor: new UrlAdaptor
});

this is what I have as dataManager


VD Vinitha Devi Murugan Syncfusion Team November 11, 2019 04:24 AM

 
Hi Youssef, 
 
Syncfusion Greetings. 
 
We have tested your shared code in which field mapping is incorrect, which is the root cause of the reported issue. We prepared the sample below with the right field mapping, please refer to it. 
 

 
Regards, 
M.Vinitha devi 



YT yasser taibi May 18, 2022 01:03 AM

Hello

please can someone help me with the execution of the program gives me this time offset in the frontback part of the project but at the database it saves the exact times


img3.JPG

mongoDB 

img2.JPG




Loader.
Live Chat Icon For mobile
Up arrow icon