williamtroup/Calendar.js

Export to Json/Import from Json issue.

fordcrews opened this issue · 3 comments

I created an event for when my shop is open and excluded holidays from it by removing them manually. When I save it to json, then reload the json file, the removed dates show back up. Below is the seriesIgnoreDates line from when I saved it, it appears to list the dates twice, then 3 times, then 4 times.

"seriesIgnoreDates":[04/06/2022,04/06/2022,01/10/2022,01/10/2022,01/10/2022,26/11/2022,26/11/2022,26/11/2022,26/11/2022,24/10/2022,24/10/2022,24/10/2022,24/10/2022,24/10/2022,05/08/2022],

I tried saving it again after removing the extra events and saving it and I got.

"seriesIgnoreDates":[0.00370919881305638,0.0003297065611605671,0.0003297065611605671,0.0003090999010880316,0.0003090999010880316,0.0003090999010880316,0.0005440158259149357,0.0005440158259149357,0.0005440158259149357,0.0005440158259149357,0.0011869436201780415,0.0011869436201780415,0.0011869436201780415,0.0011869436201780415,0.0011869436201780415,0.0011689596259329197,0.0011689596259329197,0.0011689596259329197,0.0011689596259329197,0.0011689596259329197,0.0011689596259329197,30/04/2022,04/06/2022,04/06/2022,01/10/2022,01/10/2022,01/10/2022,26/11/2022,26/11/2022,26/11/2022,26/11/2022,24/10/2022,24/10/2022,24/10/2022,24/10/2022,24/10/2022,05/08/2022],

I tried removing all the extra dates from the saved file and it still doesn't exclude the excluded dates.

I will take a look into the duplicate dates appearing in the list, but I'm not sure what is happening with the other data, as it looks like you are inserting numbers into the array, which obviously won't be understood.

Thanks

After some investigation into the issue, I have found the reason that ignore dates don't get imported. This will be fixed in v1.4.3.

Thanks again for your feedback!

Just released v1.4.3.

Enjoy!