[Item.data.value] ?? “Pick a date”
Is probably what you’re looking for. Nullish coalescing operator (??) - JavaScript | MDN
[Item.data.value] ?? “Pick a date”
Is probably what you’re looking for. Nullish coalescing operator (??) - JavaScript | MDN
Hi @Broberto,
The issue is that I need to use the formatDate() function (Date plugin). I get timestamps from Xano like -823219200000. When I don’t use formatDate() The placeholder just shows -823219200000. When I use formatDate() the correct date 1943-12-01 is shown. But when I use formatdate() and the value from Xano is null the error “First parameter must be a string date” pops up in Weweb.
You can try with ternary operator. It would be something like this:
item.data.value ? formatdate(item.data.value) : 'pick a date'
Thanks! works like a charm!