# Date Range Component question

**URL:** <https://forum.inductiveautomation.com/t/date-range-component-question/2073>\
**Category:** Ignition\
**Created:** [July 23, 2010, 7:43pm UTC](https://forum.inductiveautomation.com/t/date-range-component-question/2073 "2010-07-23T19:43:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jon.Trusik](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jon.Trusik](https://forum.inductiveautomation.com/u/Jon.Trusik)\
**Post date:** [July 23, 2010, 7:43pm UTC](https://forum.inductiveautomation.com/t/date-range-component-question/2073/1 "2010-07-23T19:43:32Z")

</div>

Can the Date Range Component Start Date be ‘preloaded’ when a window opens? I’m trying to use the internalFrameActivated event of the window opening to set the startDate property to a date but continue to get an error of “can’t convert ‘my value’ to java.util.Date”.

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [July 23, 2010, 10:25pm UTC](https://forum.inductiveautomation.com/t/date-range-component-question/2073/2 "2010-07-23T22:25:27Z")

</div>

Yes, you just need to bind the start date and end date to an expression like now(0).

---

<div class="post-metadata">

**Author:** ![Jon.Trusik](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jon.Trusik](https://forum.inductiveautomation.com/u/Jon.Trusik)\
**Post date:** [July 27, 2010, 11:08am UTC](https://forum.inductiveautomation.com/t/date-range-component-question/2073/3 "2010-07-27T11:08:03Z")

</div>

What I’m looking to do is just set either date one time, upon entering the window. If I bind it, then it continuously resets to that value. I just need an example of the expression to do this.

---

<div class="post-metadata">

**Author:** ![Robert.McKenzie](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/robert.mckenzie/32/4134_2.png) [@Robert.McKenzie](https://forum.inductiveautomation.com/u/Robert.McKenzie)\
**Post date:** [July 27, 2010, 3:46pm UTC](https://forum.inductiveautomation.com/t/date-range-component-question/2073/4 "2010-07-27T15:46:00Z")

</div>

The expression “now(x)” will continuously reevaluate every x seconds. If you use a 0, then it will only evaluate when the window opens.

If you are using a SQL Query, then you can set the Polling Mode to “Off” to get the same effect.
