# Limit the time that users can select based on a time windows

**URL:** https://forums.knack.com/t/limit-the-time-that-users-can-select-based-on-a-time-windows/7532
**Category:** API & Custom Code
**Created:** [October 12, 2016, 9:24pm UTC](https://forums.knack.com/t/limit-the-time-that-users-can-select-based-on-a-time-windows/7532 "2016-10-12T21:24:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![JesusPinei28405](https://avatars.discourse-cdn.com/v4/letter/j/ce73a5/32.png) [@JesusPinei28405](https://forums.knack.com/u/JesusPinei28405)
#### Post date: [October 12, 2016, 9:24pm UTC](https://forums.knack.com/t/limit-the-time-that-users-can-select-based-on-a-time-windows/7532/1 "2016-10-12T21:24:37Z")

</div>

Hello has anyone found a way to limit what time can be picked based on a time windows.

For example can I limit what time can be selected in a Date\Time field based on another Date\Time field?

Our app has one field that starts a record, then a second date and time that is based on that first one. I want to only give users the option to select a time **2 hours after** the first time and also **set a limit, like 5:00 PM**. So for example, if the request was **started at 8:00 AM, then the second time can only be from 10:00 AM to 5:00 PM**.

Your help is greatly appreciated.

This is a big request we have. Users are selecting wrong hours even though they know they have a 2 hour gap that needs to be filled first.

Thank you!!!
