I need to use the date column from hubDB but if I don’t set a date in the row, today’s date is set by default. How can I avoid this so that if I don’t choose a date, it is not today’s?
Hey @naixs
Printing an empty date object will return a new date object, hense why you get todays date.
To avoid this you need to check if a date object exists before printing.
I’d use a ternary operator in your case. This hubl below illustrates how to test:
{% for row in table %}
<b>{{ row }}</b>
<br>
{{ !row.date ? 'No date set' : 'Date Set'}}
<br><br>
{% endfor %}
Hope that makes sense and gets you moving!