# Calendar customizing

**URL:** <https://forum.inductiveautomation.com/t/calendar-customizing/15279>\
**Category:** Ignition\
**Created:** [September 8, 2017, 2:26am UTC](https://forum.inductiveautomation.com/t/calendar-customizing/15279 "2017-09-08T02:26:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wokenup](https://avatars.discourse-cdn.com/v4/letter/w/d6d6ee/32.png) [@wokenup](https://forum.inductiveautomation.com/u/wokenup)\
**Post date:** [September 8, 2017, 2:26am UTC](https://forum.inductiveautomation.com/t/calendar-customizing/15279/1 "2017-09-08T02:26:30Z")

</div>

Hi guys,  
I’m trying to configure a calendar component for selection data from the past. It works OK however when you select a future date, it shows an error due to no data stored in DB. I tried scripting in calendar component, returns a msgBox saying “Wrong Date”, but it doesn’t work properly when using Property Change Event Handler.  
Is it possible to somehow disable future dates for selection in the calendar?  
Mant thanks in advance!

---

<div class="post-metadata">

**Author:** ![brandon1](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@brandon1](https://forum.inductiveautomation.com/u/brandon1)\
**Post date:** [September 8, 2017, 12:58pm UTC](https://forum.inductiveautomation.com/t/calendar-customizing/15279/2 "2017-09-08T12:58:00Z")

</div>

```auto
if event.propertyName == "latchedDate":
	if event.newValue>system.date.now():
		event.source.latchedDate = system.date.now()

```

Put this in the property change event.  
Whenever the user selects a date (by pressing the OK button) that is greater than the current time, it sets it back to the current time.

---

<div class="post-metadata">

**Author:** ![wokenup](https://avatars.discourse-cdn.com/v4/letter/w/d6d6ee/32.png) [@wokenup](https://forum.inductiveautomation.com/u/wokenup)\
**Post date:** [September 12, 2017, 5:06am UTC](https://forum.inductiveautomation.com/t/calendar-customizing/15279/3 "2017-09-12T05:06:31Z")

</div>

Thanks a lot, that helped! 🙂
