Two Questions 1. Scheduling? 2. Server type?

  1. Is there a way to schedule elements on the page to turn the visibility on & off on specific dates?
  2. Are the sites hosted on a cloud or dedicated server? I would assume dedicated, but want to answer for a client.

Hey,

Sorry for later answer, we must have missed this question.

  1. Currently, the only way to accomplish this is by creating custom JavaScript. For instance, you could create a class named ‘newyear-banner’ and assign it to an element that you wish to display only on December 31st. Set the default state to ‘display: none’. Then, use JavaScript to check the current date, and reveal the element if the date is correct. I quicky used example below to create code below with Chat GPT. So something like this one below should work.
    // Check the current date
    var currentDate = new Date();
    var month = currentDate.getMonth() + 1; // getMonth() returns month from 0-11
    var day = currentDate.getDate();

    // Check if it's December 31st
    if (month === 12 && day === 31) {
        // If it's December 31st, display the element with the 'newyear-banner' class
        $('.newyear-banner').css('display', 'block');
    }
  1. It’s cloud, and we are utilizing a CDN for everything along with Anycast IP, ensuring your website operates extremely fast worldwide. For assets (images, videos, files), we are using BunnyCDN
1 Like

Thank you for the reply, better late than never :wink:
Your scheduling solution could potentially work for now, however for collaborator’s this process might be more difficult. Do you think since it’s such a simple solution with javascript, that it is a feature that we might could expect in the future. I’d love to be able to select a date for it to show or hide by right clicking on the element in the left hand menu, a simple interface that worked with your shared script would be absolutely amazing.
For example:
Screenshot 2024-01-28 at 5.06.52 AM

I can create a plugin that would work in front-end, using similar code that I wrote above, just adding range option, so you can choose multiple days. In that way, you would visually choose dates, and I would run JS without you needing to touch it. Would that work?

@Pakic Yes I think that would work great

@Pakic please do follow up if you get it done, thank you so much

1 Like

Hey,

I’ve created a plugin, but it will be published a bit later today, here you go video tutorial:

2 Likes

@Pakic Thank you so much :slight_smile: