# Date Time Picker, Save value

**URL:** <https://forum.inductiveautomation.com/t/date-time-picker-save-value/56332>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [February 19, 2022, 6:58am UTC](https://forum.inductiveautomation.com/t/date-time-picker-save-value/56332 "2022-02-19T06:58:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![craigb](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@craigb](https://forum.inductiveautomation.com/u/craigb)\
**Post date:** [February 19, 2022, 6:58am UTC](https://forum.inductiveautomation.com/t/date-time-picker-save-value/56332/1 "2022-02-19T06:58:15Z")

</div>

Hi,

When picking a value in 2 x date time pickers to preform a Between SQL query, everything works as should. When I change views and navigate back, the datetime values have been reset to null. Is there a way to retain the selected values during the session ?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [February 19, 2022, 7:35am UTC](https://forum.inductiveautomation.com/t/date-time-picker-save-value/56332/2 "2022-02-19T07:35:53Z")

</div>

Create a pair of session variables, _date1_ and _date2_ and bind the calendar props to those. (Select ‘Perspective’ from the Project Browser and add them in the _CUSTOM_ section.)  
Enable _bidirectional_ so the calendar can update the variables and the variables can update the calendar.

---

<div class="post-metadata">

**Author:** ![craigb](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@craigb](https://forum.inductiveautomation.com/u/craigb)\
**Post date:** [February 19, 2022, 1:15pm UTC](https://forum.inductiveautomation.com/t/date-time-picker-save-value/56332/3 "2022-02-19T13:15:58Z")

</div>

Thankyou. As soon as I read your reply the light bulb came on. Easy when you know how. 🙂
