# Add conditions issue, datetime

**URL:** <https://community.glideapps.com/t/add-conditions-issue-datetime/47337>\
**Category:** Ask for Help\
**Created:** [August 20, 2022, 8:47pm UTC](https://community.glideapps.com/t/add-conditions-issue-datetime/47337 "2022-08-20T20:47:19Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![oliver\_swe](https://avatars.discourse-cdn.com/v4/letter/o/58956e/32.png) [@oliver\_swe](https://community.glideapps.com/u/oliver_swe)\
**Post date:** [August 20, 2022, 8:47pm UTC](https://community.glideapps.com/t/add-conditions-issue-datetime/47337/1 "2022-08-20T20:47:19Z")

</div>

I have a Collection displayed as a calendar with a Start datetime and End datetime.

I’ve added a condition  
Actions-\>Allow adding events-\> “Shift / Start Datetime” is before “Shift / End Datetime”

But this doesn’t seem to have any impact. Any ideas? Am I doing something wrong here?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [August 21, 2022, 12:51am UTC](https://community.glideapps.com/t/add-conditions-issue-datetime/47337/2 "2022-08-21T00:51:07Z")

</div>

Do you really have some entries that contain a “Start Datetime” after the “End Datetime”?

Can you give us some screenshots on the result and what you expect to see?

---

<div class="post-metadata">

**Author:** ![oliver\_swe](https://avatars.discourse-cdn.com/v4/letter/o/58956e/32.png) [@oliver\_swe](https://community.glideapps.com/u/oliver_swe)\
**Post date:** [August 21, 2022, 5:01pm UTC](https://community.glideapps.com/t/add-conditions-issue-datetime/47337/3 "2022-08-21T17:01:51Z")

</div>

Yes - I really do, because I created them in tested. I don’t want the app to accept these entries.

I expect that when you select a Start Datetime after the End Datetime, then the “Submit” button would be disabled. Instead, the button is enabled and clicking it adds the event.

---

<div class="post-metadata">

**Author:** ![ShantanuIyengar](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/shantanuiyengar/32/35546_2.png) [@ShantanuIyengar](https://community.glideapps.com/u/ShantanuIyengar)\
**Post date:** [August 21, 2022, 6:04pm UTC](https://community.glideapps.com/t/add-conditions-issue-datetime/47337/4 "2022-08-21T18:04:10Z")

</div>

If its form, the data is accepted regardless and the computations happen post data entry!  
I would suggest deleting the entry if not acceptable by your conditions added and showing a notification like “Error saving entry log”

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [August 22, 2022, 12:17am UTC](https://community.glideapps.com/t/add-conditions-issue-datetime/47337/5 "2022-08-22T00:17:23Z")

</div>

As @ShantanuIyengar said, there’s no real validation in a form environment to disable the submit button as you want.

> [@How do I create a custom form?](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014):
>
> I’m just dropping this here so I have something to refer people to when they ask. This is a simple concept app (copyable), that demonstrates the following techniques: Building custom forms for adding and editing list items (as an alternative to the native forms provided by Glide) Preventing duplicate new entries using [User Specific Columns](https://docs.glideapps.com/all/reference/data-editor/user-specific-columns) and [Relations](https://docs.glideapps.com/all/reference/data-editor/computed-columns/relation-column) Enforcing mandatory input items The use of visibility conditions and user specific booleans to control user flow There is nothing particula…

If you need it to be validated at that stage, create a custom form. Disable the submit button with your condition should work, because it’s a visibility condition at that point.

---

<div class="post-metadata">

**Author:** ![oliver\_swe](https://avatars.discourse-cdn.com/v4/letter/o/58956e/32.png) [@oliver\_swe](https://community.glideapps.com/u/oliver_swe)\
**Post date:** [August 22, 2022, 9:01am UTC](https://community.glideapps.com/t/add-conditions-issue-datetime/47337/6 "2022-08-22T09:01:47Z")

</div>

Thank you for your answering my question.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [August 23, 2022, 12:05am UTC](https://community.glideapps.com/t/add-conditions-issue-datetime/47337/7 "2022-08-23T00:05:27Z")

</div>

Please let us know if it works, we’ll be happy to help if you find any problems.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [August 24, 2022, 12:05am UTC](https://community.glideapps.com/t/add-conditions-issue-datetime/47337/8 "2022-08-24T00:05:55Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
