strapi-calendar icon indicating copy to clipboard operation
strapi-calendar copied to clipboard

Suggestion: Using component fields to select start/end datetime

Open rehantoday opened this issue 1 year ago • 1 comments

While exploring this plugin, I have noticed that if I have a use-case where I have a component inside an entity which is used to group related fields. I cannot select datetime or title from inside that component.

Example:

|__ Entity: Program
    |__ Component 1: Basic Data
         |__ Name:
         |__ Details:
    |__ Component 2: Timing
         |__ Start Time:
         |__ End Time:

I wonder if this is a popular use-case or not. But at least in my experience this is a much-needed feature.

rehantoday avatar Jul 03 '24 19:07 rehantoday

I love this idea however, I've working on this and I'm unable to query by component's value. In other words, this fails:

await strapi.documents(config.collection).findMany({
        filters: {
          $and: [
            {
              'timing.startTime': {
                $gte: moment(startDate).startOf('day').format(),
                $lte: moment(endDate).endOf('day').format(),
              },
            },
          ],
        },
      })

I've been searching and I don't think it's possible Do you have documentation or an example I can run to get it to work?

LuisRodriguezLD avatar Oct 02 '24 18:10 LuisRodriguezLD

Closing due to inactivity

LuisRodriguezLD avatar Apr 24 '25 13:04 LuisRodriguezLD