Topic: Use ICS first entry in Elementor Pro Countdown

Home Pro Support Forums General Support Use ICS first entry in Elementor Pro Countdown

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7376
    Martijn Smit
    Participant

    Gentle people,

    Is it possible to use attributes of the first entry of a list I built in the ICS Calendar builder? Would be nice to use this as a date/time value of that event in the Countdown element (Elementor Pro). I can use a shortcode pointing back perhaps to some data/time attribute in ICS or use some ‘database attribute’ as well.

    Let me know if you have a hint to make this work. Now I need to change it manually every time a calendar event expires.

    Thanks,
    Martijn

    #7377
    room34
    Keymaster

    I’m not quite sure I understand what you mean, but it sounds like you are referring to attributes of the HTML tag(s) for the first event in list view, is that correct?

    You should be able to select the first event in the list with this CSS/jQuery selector:

    article.ics-calendar-list-wrapper div.ics-calendar-date-wrapper:first-child

    From there you could select additional child elements to retrieve their attributes or (in jQuery) the text they contain. The attributes, such as they are, are mostly using display formats of dates and are not really ideal for doing calculations (e.g. for countdowns), but you may be able to make it work.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.