Jump to content

Recommended Posts

Posted

This is a great tutorial! I've got the events calendar up and running and now I'm working on customization.

Has anyone used this calendar with multi-day events? We have a lot of events that run on Saturday and Sunday. I could duplicate the event (ie "Day Two") as a separate entry if I needed to, but I wondered if anyone had tried multi-day events before a different way. I'm using the code snippet for allowing multiple events on one day, too, btw.

Thanks!

Posted

I think that supporting multi-day events would just be a matter of adding an end_date field, and consider the existing date field a start_date field. Either that, or you could use a "number of days" field instead of an end_date, but I think having distinct start_date and end_date fields is better because they can support a time component, and they can be queried more easily. 

  • 9 months later...
  • 4 months later...
  • 1 year later...
  • 1 year later...
Posted

@Nagendra

Hello

As far as I know, all the code needed is in the first post in this thread, (link to first post).

Have you tried following the tutorial? If so, can you describe what is, and what is not, working and perhaps people can try to help you out. Your request, as it stands, is pretty ill defined.

 

  • Like 1
  • 1 year later...
  • 10 months later...
Posted

hey there,

i'm pretty sure it's a dumb question, but im getting console errors for unexpected tokens: <

 

var cal = $( '#calendar' ).calendario({
        displayWeekAbbr : true,
        caldata : {
            <?= getEvents(); ?> // this is our function to grab our events
         }
    });

 

Posted

Looks like you've placed the inline script into a JS file, right? In that case you'll need a different approach to get the event data into the JS world, the PHP injection from

<?= getEvents(); ?>

does only work when you embed the whole <script>...</script> block into your markup.

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...