# How to get popup calendar to change every morning

**URL:** <https://forum.inductiveautomation.com/t/how-to-get-popup-calendar-to-change-every-morning/83913>\
**Category:** Ignition\
**Tags:** scripting, vision\
**Created:** [January 8, 2024, 1:22pm UTC](https://forum.inductiveautomation.com/t/how-to-get-popup-calendar-to-change-every-morning/83913 "2024-01-08T13:22:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Evans](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@Alex\_Evans](https://forum.inductiveautomation.com/u/Alex_Evans)\
**Post date:** [January 8, 2024, 1:22pm UTC](https://forum.inductiveautomation.com/t/how-to-get-popup-calendar-to-change-every-morning/83913/1 "2024-01-08T13:22:19Z")

</div>

Hi,

I am new to the scripting and am trying to get a popup calendar to change to the current date at 5:00am every morning but needs to be changeable?

Thanks in advanced

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [January 8, 2024, 1:53pm UTC](https://forum.inductiveautomation.com/t/how-to-get-popup-calendar-to-change-every-morning/83913/2 "2024-01-08T13:53:29Z")

</div>

Use an expression binding on the selected date.

```auto
setTime(now(0),5,0,0)

```

`now(0)` only evaluates once and does not poll because of the zero. Then set the time to 5.

You can change the datetime manually where the expression will be re-evaluated on window open or current date change.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [January 8, 2024, 2:05pm UTC](https://forum.inductiveautomation.com/t/how-to-get-popup-calendar-to-change-every-morning/83913/4 "2024-01-08T14:05:55Z")

</div>

This post is tagged for `Vision` not perspective.

---

<div class="post-metadata">

**Author:** ![Alex\_Evans](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@Alex\_Evans](https://forum.inductiveautomation.com/u/Alex_Evans)\
**Post date:** [January 8, 2024, 5:07pm UTC](https://forum.inductiveautomation.com/t/how-to-get-popup-calendar-to-change-every-morning/83913/5 "2024-01-08T17:07:37Z")

</div>

worked perfectly, thank you very much!
