We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13166
    • 24 Posts
    I have an CALx calendar with events. On the homepage I want to output the next events from now, with a timeshift of one month. How to do that? Every event has an startdate TV (startDateofEvent).

    Can you help me? Please!
      • 18397
      • 3,250 Posts
      Use a standard Ditto call with the added parameter &filter=`startDateofEvent,@EVAL return strtotime("+1 month");,6`
        • 13166
        • 24 Posts
        It sound great, but it seams what the filter doesn’t work. I thought that the different time formats were the problem, so I changed the ditto call:

        [!Ditto? &display=`10` &tpl=`dittoEventHome` &parents=`22` &filter=`startDateofEvent,@EVAL return strftime("%A %d, %B %Y",strtotime("+1 month"));,6` &sortBy=`startDateofEvent ` &dateSource=`startDateofEvent` &dateFormat=`%m`!]


        But that’s not the reason. I get the right dates but the filter doesn’t work. On my Homepage you cant see the result. At the top off the event list you will find the filter date. And the "startDateofEvent is below the bar with the month.

        I always get all events.
          • 18397
          • 3,250 Posts
          My example assumed that startDateofEvent has the unixtime output widget. Based on your response, I’m guessing it needs to be set. Then my example should work.
            • 13166
            • 24 Posts
            In the setup description of CALx the following is written:


              In order to use TV’s: create 2 Tv’s with our utiliser les TV
                Create 2 Tv’s set as:
                Type: Date
                Widget: Date Formatter
                *Do not change the format.
              Select the template where they will be available

            But I changed it to unixtime and it works. Now I have to check all the calender features.

            Thanks