I use a date picker on a page and the date picker opens and works without a problem when the date picker has no dynamic min value set.
Once I set a dynamic value like this, the date picker opens but closes as I move my mouse onto the date picker container. Here is the code and a video:
<input type="text" id="datePassport" class="form-control" name="datePassport" is="dmx-date-picker" dropsup="true" showdropdowns="true" format="YYYY-MM-DD" data-rule-date="" dmx-bind:mindate="vardatetime.datetime.addYears(-18)">
Teodor
February 7, 2025, 3:14pm
2
Which version of Wappler and App Connect are you using, are you sure this is not related to the dropsup option, or does this also happen when it is turned off?
7 Beta 17
It unfortunately does the same with or without dropup. As soon as I mouse over the date container closes instantly without a click on it.
Only does the auto close when I add this rule:
dmx-bind:mindate="vardatetime.datetime.addYears(-18)"
Notum
February 8, 2025, 4:56pm
5
I confirm this bug.
Full source:
<dmx-datetime id="vardatetime"></dmx-datetime>
<meta name="ac:route" content="/aaa">
<div class="container mt-5">
<div class="row mt-5">
<div class="col mt-5">
</div>
</div>
</div>
<div class="container mt-5">
<div class="row mt-5">
<div class="col mt-5">
</div>
</div>
</div>
<div class="container mt-5">
<div class="row mt-5">
<div class="col mt-5">
</div>
</div>
</div>
<div class="container mt-5">
<div class="row mt-5">
<div class="col mt-5"><input type="text" id="datePassport3" class="form-control mt-5" name="datePassport3" is="dmx-date-picker" dropsup="true" showdropdowns="true" format="YYYY-MM-DD" dmx-bind:mindate="vardatetime.datetime">
</div>
</div>
</div>
franse
February 8, 2025, 5:37pm
7
I think I know what's happening,
@pixlapps @Notum
What happens if in datetime
component change from seconds
to hours
?
2 Likes
brad
February 8, 2025, 5:44pm
8
I was just going to say that. The date time is probably set to seconds.
1 Like
I would recommend always casting the date to the ISO 8601 format.
i.e.
vardatetime.datetime.addYears(-18)
vardatetime.datetime.addYears(-18).formatDate('yyyy-MM-dd')
Thanks. Changing datetime component to minutes from seconds worked and fixed it.
system
Closed
February 11, 2025, 7:20am
12
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.