I have been through the tutorials, but none match my needs.
Part of my page is this:
<img src="graphics/btn_locatie.png">
{{locatie}} - {{plaats}}<br><img src="graphics/btn-datum.png">{{datumaanvang.formatDate("d MMM yyyy")}}-{{tijdaanvang.formatDate("H:mm")}} / {{datumeind.formatDate("d MMM yyyy")}}-{{tijdeind.formatDate("H:mm")}}
</small>
Now I need to show {{datumeind.formatDate("d MMM yyyy")}}
only if it is bigger than 0000-00-00 or later than {{datumaanvang.formatDate("d MMM yyyy")}}
1 Like
Teodor
2
Hello,
In what format is the datumeind returned? What database field type is this?
Database field type is “date”. It is returned in the page as “1 Nov 2018” in the database as “2018-11-01”
ben
4
Just to show what I have done, which does work, but doesn’t seem to be a proper Wappler way.
dmx-class:grayscale="!SentDateTime.startsWith(0)"
This removes the colour from the image if the date is not 0000-00-00
Nice workaround @ben, but doesn’t this leave you with “whitespace” where the date is outcolored?
Teodor
6
If i understand your conditions correctly - you can try this condition:
<span dmx-show="datumeind != '0000-00-00' || datumeind > datumaanvang ">{{datumeind.formatDate("d MMM yyyy")}}</span>
Perfect! Thank you number 15,000 is in order. 