<p>Have managed to resolve by updating the <code>_convertTimes</code> function in <code>venti/fieldtypes/Venti_EventFieldType.php</code>.</p>

<p>Change (line 141):</p>

<pre><code>if ((is_string($value['startDate']) &amp;&amp; $value['startDate']) || (is_array($value['startDate']) &amp;&amp; $value['startDate']['time']))
</code></pre>

<p>To:</p>

<pre><code>if ((is_string($value['startDate']) &amp;&amp; $value['startDate']) || (is_array($value['startDate']) &amp;&amp; $value['startDate']['time']) || (is_array($value['startDate']) &amp;&amp; $value['allDay'] == 1 &amp;&amp; $value['startDate']['date']))`
</code></pre>

<p>And (line 150):</p>

<pre><code>if ((is_string($value['endDate']) &amp;&amp; $value['endDate']) || (is_array($value['endDate']) &amp;&amp; $value['endDate']['time']))
</code></pre>

<p>To: </p>

<pre><code>if ((is_string($value['endDate']) &amp;&amp; $value['endDate']) || (is_array($value['endDate']) &amp;&amp; $value['endDate']['time']) || (is_array($value['endDate']) &amp;&amp; $value['allDay'] == 1 &amp;&amp; $value['endDate']['date']))
</code></pre>

<p>This will remove the need to add a time if an all day event is specified.</p>

CC BY-SA 3.0
2016-05-13T10:23:05.733Z
2016-05-13T10:23:05.733Z
Cole Henley
<p>I've added a Venti fieldtype to an entry and when I try to save it as an all-day event it says <code>Couldn't save entry</code></p>

<pre><code>Start Date and time must be set.
End Date and time must be set.
</code></pre>

<p>Help appreciated!</p>

CC BY-SA 3.0
2016-05-13T12:12:12.203Z
Hey Cole, please report this directly to the plugin developer. You can get in touch with them from the “Give Feedback/Get Help” link at the top-right of https://venti.helpdocs.com. Thanks!
Brandon Kelly
CC BY-SA 3.0
2016-05-13T15:53:44.337Z
Per your solution (below), it looks like this was a bug in the plugin. Please report the bug to the plugin developers through their proper channels. Thanks.
Lindsey D
CC BY-SA 3.0
2016-05-13T15:55:00.017Z
Thanks - have done. Posted answer here in case anybody else was experiencing a similar issue
Cole Henley
<fieldtypes><plugin-ventievents>
Venti fieldtype bug
# Venti fieldtype bug

(Asked by: username_0 on 2016-05-13)

I've added a Venti fieldtype to an entry and when I try to save it as an all-day event it says Couldn't save entry
Start Date and time must be set.
End Date and time must be set.

Help appreciated!

**Tags:** fieldtypes, plugin-ventievents
> **Comments:**
> **username_1**: Hey Cole, please report this directly to the plugin developer. You can get in touch with them from the “Give Feedback/Get Help” link at the top-right of https://venti.helpdocs.com. Thanks!  
> **username_2**: Per your solution (below), it looks like this was a bug in the plugin. Please report the bug to the plugin developers through their proper channels. Thanks.  
> **username_0**: Thanks - have done. Posted answer here in case anybody else was experiencing a similar issue  

---

## 1 answers

### Answer by username_0 on 2016-05-13. Score: 1

Have managed to resolve by updating the _convertTimes function in venti/fieldtypes/Venti_EventFieldType.php.
Change (line 141):
if ((is_string($value['startDate']) && $value['startDate']) || (is_array($value['startDate']) && $value['startDate']['time']))

To:
if ((is_string($value['startDate']) && $value['startDate']) || (is_array($value['startDate']) && $value['startDate']['time']) || (is_array($value['startDate']) && $value['allDay'] == 1 && $value['startDate']['date']))`

And (line 150):
if ((is_string($value['endDate']) && $value['endDate']) || (is_array($value['endDate']) && $value['endDate']['time']))

To: 
if ((is_string($value['endDate']) && $value['endDate']) || (is_array($value['endDate']) && $value['endDate']['time']) || (is_array($value['endDate']) && $value['allDay'] == 1 && $value['endDate']['date']))

This will remove the need to add a time if an all day event is specified.


---

