# Create a calendar from dates in multiple structure fields

**URL:** <https://forum.getkirby.com/t/create-a-calendar-from-dates-in-multiple-structure-fields/22801>\
**Category:** Questions\
**Created:** [July 6, 2021, 10:23am UTC](https://forum.getkirby.com/t/create-a-calendar-from-dates-in-multiple-structure-fields/22801 "2021-07-06T10:23:35Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![tacotac](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/tacotac/32/14065_2.png) [@tacotac](https://forum.getkirby.com/u/tacotac)\
**Post date:** [July 15, 2021, 2:15pm UTC](https://forum.getkirby.com/t/create-a-calendar-from-dates-in-multiple-structure-fields/22801/11 "2021-07-15T14:15:59Z")

</div>

Thanks (again) for your help **pixelijn**. I tried your proposal but it didn’t work…

I finally and hopefully managed to make my functions echo the right movies in the right month/day/time slots by adding a simple boolean, as suggested by **Sonja** in [this post](https://forum.getkirby.com/t/filter-by-last-date-from-structure/13134/6) 😊

```auto
$filteredScheduledMovies = $scheduledmovies->filter(function ($child) use($day) {
  return $child->schedules()->toStructure()->filter(function ($item) use ($day) {
    return ($item->day()->toDate('%F') == $day) && ($item->hour()->toDate('%H') >= 16) && ($item->hour()->toDate('%H') < 18);
  })->count();
});

```

Here is the current result:

 ![Capture d’écran 2021-07-15 à 16.10.24](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/0/00f29bb48fa51be12974d172cd1bc51a2b9fa540.png)

Now I’ll have to find a proper way to make each time slot clickable by users so the movie theater team will know who will be contributing as a volunteer 🤓

---

_[View the full topic](https://forum.getkirby.com/t/create-a-calendar-from-dates-in-multiple-structure-fields/22801)._
