# Display/Hide elements on specific day/time

**URL:** <https://forum.wixstudio.com/t/display-hide-elements-on-specific-day-time/3778>\
**Category:** Ask the community\
**Tags:** question, code\
**Created:** [November 13, 2021, 10:03pm UTC](https://forum.wixstudio.com/t/display-hide-elements-on-specific-day-time/3778 "2021-11-13T22:03:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![info18544](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/info18544/32/30860_2.png) [@info18544](https://forum.wixstudio.com/u/info18544)\
**Post date:** [November 13, 2021, 10:03pm UTC](https://forum.wixstudio.com/t/display-hide-elements-on-specific-day-time/3778/1 "2021-11-13T22:03:40Z")

</div>

Example: I want to display a button to the live stream on Sunday and hide it for the rest of the week.

Thanks.

---

<div class="post-metadata">

**Author:** ![J.D](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/j.d/32/7312_2.png) [@J.D](https://forum.wixstudio.com/u/J.D)\
**Post date:** [November 14, 2021, 1:15am UTC](https://forum.wixstudio.com/t/display-hide-elements-on-specific-day-time/3778/2 "2021-11-14T01:15:13Z")

</div>

Use JS Date methods to get the current day and show the element only if today === 0 (0 is Sunday, 6 is Saturday).  
See:

> **[Date.prototype.getDay() - JavaScript | MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getDay)**
>
> The getDay() method of Date instances returns the day of the week for this date according to local time, where 0 represents Sunday. For the day of the month, see Date.prototype.getDate().

P.S. Your question has been asked before, and you can search the forum to see examples.
