I’m trying to format the date like in the tutorial here…
… but I’m getting this error…
dmxAppConnect.js:7 Formatter formatDate in expression [date_signup.formatDate(‘dd/MM/yyyy HH:mm’)] doesn’t exist for type string
The dates exist as a Datetime in the db, and they seem to initially display the same as the tutorial, but when I do the format it throws the error and I see nothing displayed in the table.
It maybe seems like I need to install another package or something. I had to do that a few times in the beginning because there were some things not automatically installed by Wappler. Not sure what it would be in this case though.
My formatting…
Tutorial formatting…
<!-- Wappler include head-page="layouts/admin" fontawesome_5="cdn" bootstrap5="local" is="dmx-app" id="manageusers" appConnect="local" components="{dmxBootstrap5TableGenerator:{},dmxFormatter:{}}" -->
<meta name="ac:route" content="/cwadmin/manageusers">
<dmx-serverconnect id="conn_users" url="/api/admin/user/search"></dmx-serverconnect>
<div class="container">
<div class="row">
<div class="col mt-5">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover table-sm">
<thead>
<tr>
<th>User_id</th>
<th>First name</th>
<th>Last name</th>
<th>Email</th>
<th>Date signup</th>
<th>Authcode</th>
<th>Validated</th>
</tr>
</thead>
<tbody is="dmx-repeat" dmx-generator="bs5table" dmx-bind:repeat="conn_users.data.query" id="tableRepeat1">
<tr>
<td dmx-text="user_id"></td>
<td dmx-text="first_name"></td>
<td dmx-text="last_name"></td>
<td dmx-text="email"></td>
<td dmx-text="date_signup.formatDate('dd/MM/yyyy HH:mm')"></td>
<td dmx-text="authcode"></td>
<td dmx-text="validated.formatDate('dd/MM/yyyy HH:mm')"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
Any ideas?
Thanks.