# Duplicate scheduled event for Sundays

**URL:** <https://forum.inductiveautomation.com/t/duplicate-scheduled-event-for-sundays/54924>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [January 12, 2022, 1:53pm UTC](https://forum.inductiveautomation.com/t/duplicate-scheduled-event-for-sundays/54924 "2022-01-12T13:53:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AJBerera](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@AJBerera](https://forum.inductiveautomation.com/u/AJBerera)\
**Post date:** [January 12, 2022, 1:53pm UTC](https://forum.inductiveautomation.com/t/duplicate-scheduled-event-for-sundays/54924/1 "2022-01-12T13:53:15Z")

</div>

![CaptureWeekView](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/7/a752808980d5a9cac7b4272bae648f8adc7dbbca.png)

Here is a dataset on calender events for the week view component in Ignition 8.1.7.

If I change the start time for Sunday to 00:00:01 (any time other than midnight) then the double event goes away giving me what I want to see.

I think I am going to make a custom property for my binding and check the day of week in the dataset rows for any Sundays and if midnight, add one second and write that to the calender events property on change.  
Am I doing something wrong here or is a workaround like I described needed for Sunday scheduled events that start at midnight? Thanks.

---

<div class="post-metadata">

**Author:** ![AJBerera](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@AJBerera](https://forum.inductiveautomation.com/u/AJBerera)\
**Post date:** [January 12, 2022, 2:38pm UTC](https://forum.inductiveautomation.com/t/duplicate-scheduled-event-for-sundays/54924/2 "2022-01-12T14:38:42Z")

</div>

something like this on propertychange event

```auto
ds = event.source.c_events
newDs = ds
if event.propertyName == 'c_events':
	for i in range(ds.getRowCount()):
		startDate = ds.getValueAt(i,'startDate')
		if system.date.getDayOfWeek(startDate) == 1:
			if system.date.getMinute(startDate) == 0 and system.date.getHour24(startDate) == 0:
				newTime = system.date.addSeconds(startDate,1)
				newDs = system.dataset.setValue(ds,i,'startDate',newTime)
	event.source.events = newDs

```

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 12, 2022, 4:21pm UTC](https://forum.inductiveautomation.com/t/duplicate-scheduled-event-for-sundays/54924/3 "2022-01-12T16:21:13Z")

</div>

You should get in touch with support. We thought we’d solved all the rendering issues with this view in 8.1.1.
