Date/time picker disappears

I am using a date picker on this page
https://clientcreator.com/admin/account_realtor_email_history.asp

when i just setup the format for the date picker, it works fine…however, when i add that i only want the dates from today -10 days to be selectable, the date picker disappears after about 2 seconds.

Here is the code i am using
<div class="col-12"> <input id="date1" name="date1" is="dmx-date-picker" dmx-bind:mindate="var1.datetime.addDays(-10)"> </div>

Any reason why this might be occuring?

I couldn’t find id=“date1’” on your page - is this the current code or have you already changed something?

and you still don’t seem to be assigning values ​​to the data-picker(s) from the query manager?

sorry, yes i had to continue on working, but here is the link to the code that is not working:
https://clientcreator.com/test.asp

looks like some kind of infinite loop - can you show the code in wappler? or datapicker settings

let’s try dmx-bind:mindate=var1.datetime.toISODate().addDays(-10)"

1 Like

YES - that worked. Thank you

why do you think that is?

The reason of this, is the datetime component interval setted to “seconds” so the datepicker “renew” the min-date value every second.

Changing this:

image

To this:

image

Solves the issue.

Nice workaround, very clever :clap:t2:

ahhh…that is correct as well. i changed the datetime variable to Days and put the code back to the original way and it worked as it should. And its crazy…i saw this previously but never changed it to test it out.

Thank you both so much for the help!

1 Like

I can confirm, changing the datetime variable to days or even hours solves the problem.

1 Like