# Setting start and end dates from calendar

**URL:** <https://forum.inductiveautomation.com/t/setting-start-and-end-dates-from-calendar/35793>\
**Category:** Ignition\
**Created:** [June 18, 2020, 12:01pm UTC](https://forum.inductiveautomation.com/t/setting-start-and-end-dates-from-calendar/35793 "2020-06-18T12:01:43Z")\
**Posts on this page:** 2\
**Page:** 1

<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:** [June 18, 2020, 12:01pm UTC](https://forum.inductiveautomation.com/t/setting-start-and-end-dates-from-calendar/35793/1 "2020-06-18T12:01:43Z")

</div>

I’m having difficulty selecting the date range using the _Calendar_. When I select a day I would like to set the client tags as follows:

```auto
rangeStart = 2020-06-18 00:00:00
rangeEnd = 2020-06-18 23:59:59

```

What’s the correct way to do this?

(I’m doing this on an Ignition 7.8 machine …)

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [June 18, 2020, 3:38pm UTC](https://forum.inductiveautomation.com/t/setting-start-and-end-dates-from-calendar/35793/2 "2020-06-18T15:38:54Z")

</div>

Something like this (untested) assuming only one Calendar object named Calendar. Not sure of the exact syntax in 7.8

```auto
rangeStart = system.date.setTime(event.source.parent.getComponent("Calendar").date,0,0,0)
rangeEnd = system.date.setTime(system.date.addDays(event.source.parent.getComponent("Calendar").date,1),23,59,59)

```
