1
votes

I'm using Bootstrap calendar from http://bootstrap-calendar.eivissapp.com/

The problem is that the events are populated on every days event list. I want them to populate on their respective dates.

Here is the array thats passed as json string to the view.

Array
(

    [0] => Array
        (
            [id] => 99
            [title] => Testing 
            [class] => event-default
            [url] => /admin/courses/32/lessons/99
            [start] => 1408589100
            [end] => 1408590900
        )

    [1] => Array
        (
            [id] => 100
            [title] => rereer
            [class] => event-default
            [url] => /admin/courses/32/lessons/100
            [start] => 1408592760
            [end] => 1408599960
        )
)

Here is the calendar image:

enter image description here

All the events are placed on each date. I need them to be placed on its respective dates.

Any suggestions on how to make this work?

1

1 Answers

1
votes

Just append three zeros (or multiply by a 1000) to each [start] and [end] timestamps so the array looks like this:

Array
(

    [0] => Array
        (
            [id] => 99
            [title] => Testing 
            [class] => event-default
            [url] => /admin/courses/32/lessons/99
            [start] => 1408589100000
            [end] => 1408590900000
        )

    [1] => Array
        (
            [id] => 100
            [title] => rereer
            [class] => event-default
            [url] => /admin/courses/32/lessons/100
            [start] => 1408592760000
            [end] => 1408599960000
        )
)