# Call date input vs current day of the month

**URL:** <https://community.thunkable.com/t/call-date-input-vs-current-day-of-the-month/3310298>\
**Category:** Questions about Thunkable X\
**Created:** [October 30, 2024, 7:18am UTC](https://community.thunkable.com/t/call-date-input-vs-current-day-of-the-month/3310298 "2024-10-30T07:18:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ant\_1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ant_1/32/183393_2.png) [@ant\_1](https://community.thunkable.com/u/ant_1)\
**Post date:** [October 30, 2024, 7:18am UTC](https://community.thunkable.com/t/call-date-input-vs-current-day-of-the-month/3310298/1 "2024-10-30T07:18:35Z")

</div>

hi, i was trying to compare the current day vs the selected day so that the user has to pick today and won’t allow them to go to the next step if they pick another date.

here are my blocks:

 ![Screen Shot 2024-10-30 at 11.12.23 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/0/f002dd5a770bc04a39729a73d4e4e45fbc3cb93f.jpeg)

but for some reason the message ‘Has to start from today!’ keeps appearing although i have inputted the current date

---

<div class="post-metadata">

**Author:** ![02keilj432vnb](https://avatars.discourse-cdn.com/v4/letter/0/35a633/32.png) [@02keilj432vnb](https://community.thunkable.com/u/02keilj432vnb)\
**Post date:** [October 31, 2024, 3:21am UTC](https://community.thunkable.com/t/call-date-input-vs-current-day-of-the-month/3310298/2 "2024-10-31T03:21:24Z")

</div>

Your first if block is trying to compare a date value (which will be something like ‘Oct 31, 2024’) with a value for the current day of the week (which will be a single digit integer from 1-7 representing each weekday).

This is always going to return false.

You need to compare values of the same format. See below

 ![date compare](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/6/36ecce0afa6a5bfd1aaf136b02c2d82c806d1596.png)

Is there any reason to allow the user to select a date that **must** be todays date? Why not just get todays date using the device blocks since that appears to be the value that you want?

Or do you want them to only be able to select dates from today and into the future?

Edit: Also your second if statement attempts to add a value of 3 to a date, this will return a NaN result and will not compare properly against the start diet Get Date.

---

<div class="post-metadata">

**Author:** ![ant\_1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ant_1/32/183393_2.png) [@ant\_1](https://community.thunkable.com/u/ant_1)\
**Post date:** [October 31, 2024, 5:22am UTC](https://community.thunkable.com/t/call-date-input-vs-current-day-of-the-month/3310298/3 "2024-10-31T05:22:53Z")

</div>

ah ok thanks a lot

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [January 29, 2025, 5:22am UTC](https://community.thunkable.com/t/call-date-input-vs-current-day-of-the-month/3310298/4 "2025-01-29T05:22:57Z")

</div>

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