Antony
June 28, 2023, 1:35pm
1
Wappler Version : 5.8.2 Beta dmxAppConnect (2023-06-27 12:52)
Operating System : Windows
Server Model: PHP
Database Type: MySQL
Hosting Type: WAMP
Expected behavior
What do you think should happen?
With the following code, this date picker should show dates from now onwards…
<input id="i_activity_start_date" is="dmx-date-picker" timepicker=""
minutes-increment="5" name="start_date" type="text"
class="form-control input_text"
dmx-bind:value="activity.data.activity_event.start_date + ' ' + activity.data.activity_event.start_time"
dmx-bind:placeholder="show_label.items.contains(2200)?'':apptext.value.2202"
dmx-bind:disabled="view_edit_mode.value=='view'" format="dddd D MMMM YYYY (h:mm a)"
dmx-bind:mindate="current_datetime.datetime">
Actual behavior
What actually happens?
The first time you click into it, it shows this:
Then after that it shows a sensible calendar.
Teodor
June 28, 2023, 2:09pm
2
what is the exact value this expression returns?
activity.data.activity_event.start_date + ' ' + activity.data.activity_event.start_time
Antony
June 28, 2023, 3:15pm
3
Got a bit more feedback from the console…
When I had the NaN issues, the console showed lots of these…
And when I generally access the page with this form on, I get some of this:
Antony
June 28, 2023, 3:28pm
4
That’s a good question… as this topic is mixed in with #13 where it isn’t saving the date values…
So when I have some date and time values that saved correctly, the activity_event data looks like this:
And when this problem happens, the date and times values are null:
So the field evaluates in this case to a blank space:
What I can say is that:
It doesn’t happen if the date and time information is loaded correctly (so isn’t null)
It only happens for the Start Date/Time field and not the End one
If I load the page for a different event and then come back to the one that had the issue (so still has null date/time), then the problem goes away.
Because there is a valid min-date, I would expect it to show a functioning calendar from that date onwards right away.
I hope all that helps!
Antony.
Please test the following update
dmxDatePicker.zip (2.5 KB)
Antony
July 24, 2023, 4:26pm
7
@patrick , this is not fixed by dmxDatePicker.js @build 2023-07-21 16:03:32…
In fact it makes things worse, as it also displays the dates in tbe input in 2023-09-24 00:00:00
format rather than using the date formatter to display Sunday 24 September 2023 (12:00 am)
as the stable channel shows…
I’m getting this message in the console when the page is viewed:
Here a new update, this time I also included the map files to get error messages with correct line numbers and code. It also contains some logging for debugging.
dmxDatePicker.zip (18.0 KB)
Antony
July 26, 2023, 8:57am
9
Hi Patrick… I’m just about to do this test… the zip has a .map file in it - do I need to do anything with that?
Antony
July 26, 2023, 9:16am
10
@patrick , this is fixed with @build 2023-07-25 11:24:44…