Calendar / Calendario caldata - Trying to custom build data for the calendar

4 replies · opened Nov 22, 2016

SStuAndrewsNov 22, 2016

Hi Folks,

Wonderful template!

I'm trying to build some custom data (not using the data.js file) into the code.

Am boiling it right back into a really simple declaration, but I still can't get it to work.

Basically:

var cal = $("#calendar").calendario({ caldata : [{'11/22/2016' : 'this is an event'}] }), $month = .. (and so on)

I can't get this event to display. I've tried different formats of the json (am assuming the caldata form follows json rules? Have tried looking into the calendario plugin, but there's not heaps of info on their website), but still no dice.

Any idea what I might be doing wrong here?

Cheers,

Stu

SStuAndrewsNov 22, 2016

[Edit]
Also note that my date format is dd/mm/yyyy, which should work according to what I've read, but maybe that's the problem. Will have a test of it.

SStuAndrewsNov 22, 2016

[Edit #2]
Nope, was confused. The code above has the mm/dd/yyyy format. Apologies.

Either way, still doesn't work.

SSemicolon WebSTAFFNov 24, 2016

Hello,

Thank You so much for the Kind Words! :)

Please consider using the following code:

caldata : {'11-22-2016' : '[Example Event](http://google.com)'}

This will definitely work fine. Let us know if we can help you with anything else or if you find any further issues.

SStuAndrewsNov 26, 2016

Thanks very much!

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard