# Possible to set default date/time to the value of another date/time field?

**URL:** <https://community.glideapps.com/t/possible-to-set-default-date-time-to-the-value-of-another-date-time-field/77613>\
**Category:** Ask for Help\
**Created:** [November 4, 2024, 4:58pm UTC](https://community.glideapps.com/t/possible-to-set-default-date-time-to-the-value-of-another-date-time-field/77613 "2024-11-04T16:58:08Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![ataha88](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ataha88/32/81036_2.png) [@ataha88](https://community.glideapps.com/u/ataha88)\
**Post date:** [November 4, 2024, 4:58pm UTC](https://community.glideapps.com/t/possible-to-set-default-date-time-to-the-value-of-another-date-time-field/77613/1 "2024-11-04T16:58:08Z")

</div>

I have a native form with a start date/time field and an end date/time field. Is there a way to set the default value of the end time to be the value that was entered in the start time?  
Thank you

---

<div class="post-metadata">

**Author:** ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)\
**Post date:** [November 4, 2024, 4:58pm UTC](https://community.glideapps.com/t/possible-to-set-default-date-time-to-the-value-of-another-date-time-field/77613/2 "2024-11-04T16:58:52Z")

</div>

You are using a form for adding these data ? Right?

---

<div class="post-metadata">

**Author:** ![ataha88](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ataha88/32/81036_2.png) [@ataha88](https://community.glideapps.com/u/ataha88)\
**Post date:** [November 4, 2024, 4:59pm UTC](https://community.glideapps.com/t/possible-to-set-default-date-time-to-the-value-of-another-date-time-field/77613/3 "2024-11-04T16:59:12Z")

</div>

Yes, a native form on an overlay screen.

---

<div class="post-metadata">

**Author:** ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)\
**Post date:** [November 4, 2024, 5:01pm UTC](https://community.glideapps.com/t/possible-to-set-default-date-time-to-the-value-of-another-date-time-field/77613/4 "2024-11-04T17:01:23Z")

</div>

You might want to use the screen values by selecting the start date field.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/0/40637857e9277ae407826d258801cb95a4649d12.png)  
Then, in the right panel, choose the end date field to set that value.

---

<div class="post-metadata">

**Author:** ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)\
**Post date:** [November 4, 2024, 5:03pm UTC](https://community.glideapps.com/t/possible-to-set-default-date-time-to-the-value-of-another-date-time-field/77613/5 "2024-11-04T17:03:37Z")

</div>

OR you could create a custom action linked to the form’s onSubmit event, setting the condition: if the end date is empty, set the end date column value to the start date value.

---

<div class="post-metadata">

**Author:** ![ataha88](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ataha88/32/81036_2.png) [@ataha88](https://community.glideapps.com/u/ataha88)\
**Post date:** [November 4, 2024, 5:05pm UTC](https://community.glideapps.com/t/possible-to-set-default-date-time-to-the-value-of-another-date-time-field/77613/6 "2024-11-04T17:05:26Z")

</div>

The start time field and the end date field arent included in the parent table and don’t show up as screen values.

---

<div class="post-metadata">

**Author:** ![ataha88](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ataha88/32/81036_2.png) [@ataha88](https://community.glideapps.com/u/ataha88)\
**Post date:** [November 4, 2024, 5:07pm UTC](https://community.glideapps.com/t/possible-to-set-default-date-time-to-the-value-of-another-date-time-field/77613/7 "2024-11-04T17:07:26Z")

</div>

essentially I just want the end time value options to start from the start time. In my mind it doesn’t make sense to have end time values available that are before the start time.

---

<div class="post-metadata">

**Author:** ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)\
**Post date:** [November 4, 2024, 5:11pm UTC](https://community.glideapps.com/t/possible-to-set-default-date-time-to-the-value-of-another-date-time-field/77613/8 "2024-11-04T17:11:27Z")

</div>

Oh okay I understand now. You could set the end date to now by default ?

---

<div class="post-metadata">

**Author:** ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)\
**Post date:** [November 4, 2024, 5:16pm UTC](https://community.glideapps.com/t/possible-to-set-default-date-time-to-the-value-of-another-date-time-field/77613/9 "2024-11-04T17:16:31Z")

</div>

The only ranges offered by the native DateTime component are as follows:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/f/9fe0fe855bf680c321e726b5508e309c72a09bd0.png)

---

<div class="post-metadata">

**Author:** ![ataha88](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ataha88/32/81036_2.png) [@ataha88](https://community.glideapps.com/u/ataha88)\
**Post date:** [November 4, 2024, 5:17pm UTC](https://community.glideapps.com/t/possible-to-set-default-date-time-to-the-value-of-another-date-time-field/77613/10 "2024-11-04T17:17:22Z")

</div>

Is was worth a try! Thanks!

---

<div class="post-metadata">

**Author:** ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)\
**Post date:** [November 4, 2024, 5:18pm UTC](https://community.glideapps.com/t/possible-to-set-default-date-time-to-the-value-of-another-date-time-field/77613/11 "2024-11-04T17:18:57Z")

</div>

I should try with ai component and ask to set a minimum range of the current value of the start date. Who knows!

---

<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:** [November 5, 2024, 12:34am UTC](https://community.glideapps.com/t/possible-to-set-default-date-time-to-the-value-of-another-date-time-field/77613/12 "2024-11-05T00:34:43Z")

</div>

> [@Exploring the Enhanced Capabilities of Glide's Native Form](https://community.glideapps.com/t/exploring-the-enhanced-capabilities-of-glides-native-form/69876):
>
> I want to share about the additional capabilities that we can achieve with Glide’s native form. What I have tested with the help of CSS is that native forms can also be applied for validation. Create your validation in the table columns and present it through messages via the “hint” component. Add the visibility conditional and the class “prevent-submit” to these hint components. Add the following CSS code: /\*Container Form\*/ #page-root:has(.prevent-submi…

You can use a variation of this. Show the prevent-submti component when end date is before start date.
