Our pure JavaScript Scheduler component


Post by PinHsuehLi »

Hi, team

I need to export a new JSON file after draging the timeline.
I knew there're some php demos, but I'm not really familiar with php.

Is there any way to accomplish this without using php? (I even didn't run on the web server)
Sorry for such a rookie question :( .

Post by johan.isaksson »

Hi,

You can get JSON from a flat store by stringifying its records:
const json = JSON.stringify(store.records);
But saving that is an application problem and not within the scope of this forum. Try googling for how to download a file using JavaScript, should be plenty of pages that can show you how to do it.

Good luck!
Best regards,
Johan Isaksson

Post by PinHsuehLi »

johan.isaksson wrote: Mon Dec 10, 2018 2:50 pm Hi,

You can get JSON from a flat store by stringifying its records:
const json = JSON.stringify(store.records);
But saving that is an application problem and not within the scope of this forum. Try googling for how to download a file using JavaScript, should be plenty of pages that can show you how to do it.

Good luck!
Thank you so much.
I should use CrudManager to update the store, is that right?

Post by johan.isaksson »

That decision is up to you. You can use CrudManager or load over Ajax using our stores but you can also load data any way you prefer and just plug it into our store:
scheduler.eventStore.data = [your array of json data];
Best regards,
Johan Isaksson

Post by PinHsuehLi »

Thanks, it works!

Post Reply