Calendario icon indicating copy to clipboard operation
Calendario copied to clipboard

Calendario + day display

Open kusumj opened this issue 9 years ago • 8 comments

Hello,

I need to display the day and event as below : '24-08-2015' : 'Event 1', '24-08-2015' : 'Event 2',

can someone please help me on the above.

Thanks

kusumj avatar Aug 24 '15 12:08 kusumj

Display where?

deviprsd avatar Sep 01 '15 08:09 deviprsd

Hello ,

I need to render the code as follows :

var codropsEvents = { '07-08-2015' : 'Event 1t', '07-08-2015' : 'Event 2t', };

The date is dynamic and I am unable to group the event under similar date. That is why i need to render the code as above. But it is talking only the last one that is event 2.

Thanks for your help.

kusj avatar Sep 02 '15 10:09 kusj

Yea you can do that, but it would be good if you first use the v4 of calendario available here, https://github.com/deviprsd21/Calendario. Then, you can see how this one is written, https://github.com/deviprsd21/Calendario/blob/master/js/dataTimeline.js

deviprsd avatar Sep 02 '15 12:09 deviprsd

Hello ,

As advised I have used v4 of calendario. But my issue is still the same.

I want to be able to render the date and content as below :

'09-03-2015' : [{content : 'Graduation Exams', allDay: true}], '09-03-2015' : [{content : 'asasas', allDay: true}]

Is it possible with calendario ?

Thanks in advance,

kusj avatar Sep 03 '15 05:09 kusj

Yes it is, you just didn't read the code carefully, never mind. Write it like this

'09-03-2015' : [{content : 'Graduation Exams', allDay: true}, {content : 'asasas', allDay: true}]

You see the [ ] are arrays which contain the event objects and { } are objects which have the event details, so to add more just [{ }, { }, { }, so on]. For anymore problems contact in this repo https://github.com/deviprsd21/Calendario.

deviprsd avatar Sep 03 '15 15:09 deviprsd

Why can we not add two day events separately like his first post and have it draw both? Difficult to build like that in Ruby... 😕

shelbyKiraM avatar May 09 '16 19:05 shelbyKiraM

@blacRose Because this is in a JavaScript Object format, if you try to do like the first post, the second line will override the first one. Think of it as an array, and the date is the index key, so the same key will replace it. I hope I'm clear enough?

deviprsd avatar May 10 '16 07:05 deviprsd

Also why don't you try building hash objects similar to this in ruby, and then converting them to json, it will as it should work. The [ ] are arrays, and { } objects

deviprsd avatar May 10 '16 09:05 deviprsd