Beta 6.15
It’s possible I’m doing something wrong here as I haven’t actually used the Date and Time component before.
I created a Date and Time component and am now trying to set a variable to just the date of that. First of all, in the data bindings for the variable I’m unable to select the data formatter. Clicking it does nothing.
I went ahead and did it in code like so…
But that gives my var2 a null value…
You don’t necessarily need to assign to a variable…you can just reference the datetime of the component itself:
<dmx-datetime id="current_date" interval="days" utc="true"></dmx-datetime>
{{current_date.datetime.formatDate('yyyy')}}
EDIT: Or is that what you just tried?
I was just using the variable so I could output it to the console to show the null value. If I copy/paste your code directly it doesn’t show anything on the page.
Hmmm. Strange. I just created a blank project, with AC2, and it all works fine.
Copying here in case you spot something:
Content page:
<!-- Wappler include head-page="layouts/main" fontawesome_5="cdn" bootstrap5="local" is="dmx-app" id="index" appConnect="local" components="{dmxFormatter:{}}" -->
<dmx-datetime id="current_date" interval="days" utc="true"></dmx-datetime>
<h4 dmx-text="current_date.datetime.formatDate('yyyy-MM-dd')">Heading</h4>
<meta name="ac:route" content="/">
and layout:
<!doctype html>
<html>
<head>
<script src="/dmxAppConnect/dmxAppConnect.js"></script>
<base href="/">
<meta charset="UTF-8">
<title>Untitled Document</title>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.14.0/css/all.css" integrity="sha384-HzLeBuhoNPvSl5KYnjx0BT+WB0QEEqLprO+NBkkk5gbc67FTaL7XIGa2w1L0Xbgc" crossorigin="anonymous" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="/bootstrap/5/css/bootstrap.min.css" />
<script src="/dmxAppConnect/dmxRouting/dmxRouting.js" defer></script>
<script src="/dmxAppConnect/dmxFormatter/dmxFormatter.js" defer></script>
</head>
<body is="dmx-app" id="main">
<div is="dmx-view" id="content">
<%- await include(content, locals); %>
</div>
<script src="/bootstrap/5/js/bootstrap.bundle.min.js"></script>
</body>
</html>
Hmmm. So I created a brand new page and the formatter file wasn’t included. It was missing on the other page as well.
<script src="/dmxAppConnect/dmxFormatter/dmxFormatter.js" defer></script>
Once I add that in the code works, but I still can’t do it via the Data Formats as it doesn’t open. It does open for other things, just not to format the Date and Time variable.
Are you able to open the data formatter?
I’ll be out of the office for a few days, but as I recall, I added it using the GUI without any issues.
brad
November 1, 2023, 5:57pm
9
I can confirm this. This is happening for me as well. W6 B15 experimental enabled.
1 Like
Cheese
November 1, 2023, 6:39pm
10
Have noticed this for a few things recently, having to manually edit the expressions which up until the last few updates were able to be formatted. Will compile a list of them for a Bug Report when I have the time.
1 Like
Teodor
November 2, 2023, 7:12am
11
Please recreate the issue with the debug on and post it in a new bug report topic.
Updated for Wappler Version 5.0 and higher
We have a built-in bug reporting in Wappler that auto post a topic in this forum together with the debug log.
Starting from version 1.1.0 the logging isn’t available per default, so you need to restart Wappler with logging.
You can do that by clicking on the Wappler’s tray icon (Windows right click) and then choose “Restart with Logging”
Then reproduce your problem and choose to submit a bug report from the Wappler menu File / Submit error report … o…
brad
November 6, 2023, 6:04pm
12
This bug has already been reported here …
Wappler Version : v6.0-Beta-10
Operating System : Windows 11
Server Model: Nodejs
…YOUR TEXT HERE …
Actual behavior
[image]
1 Like