# How to make date selection state stays

**URL:** <https://community.weweb.io/t/how-to-make-date-selection-state-stays/5648>\
**Category:** Ask us anything\
**Created:** [November 30, 2023, 3:28pm UTC](https://community.weweb.io/t/how-to-make-date-selection-state-stays/5648 "2023-11-30T15:28:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![liam\_putra](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/liam_putra/32/1057_2.png) [@liam\_putra](https://community.weweb.io/u/liam_putra)\
**Post date:** [November 30, 2023, 3:28pm UTC](https://community.weweb.io/t/how-to-make-date-selection-state-stays/5648/1 "2023-11-30T15:28:46Z")

</div>

i’ve recorded a 30 secs video, explaining my issue

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [November 30, 2023, 6:33pm UTC](https://community.weweb.io/t/how-to-make-date-selection-state-stays/5648/2 "2023-11-30T18:33:02Z")

</div>

Save it to a variable, turn on preserve on navigation, and set the date to be the init value, that should work

![Screenshot 2023-11-30 at 19.32.35](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/9/9ad2d7e2f504a815282e3e012b303a234c028e3e.png)

---

<div class="post-metadata">

**Author:** ![liam\_putra](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/liam_putra/32/1057_2.png) [@liam\_putra](https://community.weweb.io/u/liam_putra)\
**Post date:** [November 30, 2023, 7:50pm UTC](https://community.weweb.io/t/how-to-make-date-selection-state-stays/5648/3 "2023-11-30T19:50:58Z")

</div>

im using weweb’s date range picker widget and cant seem to find the action to control start and end time.

where do i miss ?

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [November 30, 2023, 7:58pm UTC](https://community.weweb.io/t/how-to-make-date-selection-state-stays/5648/4 "2023-11-30T19:58:34Z")

</div>

Just right there : - )

![Screenshot 2023-11-30 at 20.58.14](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/1/186ec1c85676bcf8245dd4ad2447ef44eb7512d4.png)

---

<div class="post-metadata">

**Author:** ![liam\_putra](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/liam_putra/32/1057_2.png) [@liam\_putra](https://community.weweb.io/u/liam_putra)\
**Post date:** [December 1, 2023, 3:48am UTC](https://community.weweb.io/t/how-to-make-date-selection-state-stays/5648/5 "2023-12-01T03:48:27Z")

</div>

yes i’ve seen that part. i think i understand what you mean. let me try and get back

---

<div class="post-metadata">

**Author:** ![liam\_putra](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/liam_putra/32/1057_2.png) [@liam\_putra](https://community.weweb.io/u/liam_putra)\
**Post date:** [December 21, 2023, 5:18am UTC](https://community.weweb.io/t/how-to-make-date-selection-state-stays/5648/6 "2023-12-21T05:18:16Z")

</div>

bro, if i save the date to variable → it did not work because the calendar init value need a date format.

im a bit lost, what we want to do is

1. when a user open the dashboard, the default calendar is 30 days ( this is working )
2. when i go to detail page and when i go back → we need the calendar selection stays.

---

<div class="post-metadata">

**Author:** ![liam\_putra](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/liam_putra/32/1057_2.png) [@liam\_putra](https://community.weweb.io/u/liam_putra)\
**Post date:** [December 21, 2023, 5:59am UTC](https://community.weweb.io/t/how-to-make-date-selection-state-stays/5648/7 "2023-12-21T05:59:07Z")

</div>

Nevemind, i got the answer already. for anyone that has the same issue. what you need to do is

1. create a variable example: calendarDate
2. setup the initial date range on the page workflow
3. on the calendar picker action, use the “On Change” instead of the “On init change” and update the calendarDate variable.
