We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42094
    • 24 Posts
    Hi,

    I've used MXCalendar in a client's website to show whether or not they are open or closed. Most of the time this works great but when multiple events overlap it's not really reliable. I figured out already that the problem is the scope:

    [[!mxcalendar?
    &showCategories=`0`
    &displayType =`list`
    &&elStartDate=`now`
    &elEndDate=`+4 weeks`

    &modalView = `0`
    &isLocked=`1`
    &eventListlimit=`1`
    ]]

    I use the +4 weeks enddate tot get it working. But what I really want is to give me the (first) event, only for today (0:00 till 23:59). I've searched for this in the documentation but couldn't find it anywhere.

    Can give me a hint how to do this?



    This question has been answered by applepi. See the first response.

    • discuss.answer
      • 42094
      • 24 Posts
      I figured it out myself, this is what I came up with:

      [[!mxcalendar?
      &showCategories=`0`
      &displayType =`list`
      &&elStartDate=`today`
      &elEndDate=`tomorrow`

      &modalView = `0`
      &isLocked=`1`
      &eventListlimit=`1`
      ]]

      It's all in the PHP strtotime doumentation:
      http://php.net/manual/en/datetime.formats.relative.php