Date picker default to today

Probably a very simple question but I cannot find it...
How do I set the date picker input field to have a default value set to today?

Mine is empty. I tried binding the value to the today variable but the input is still empty...

<input class="form-control" id="date1" name="date_checked" is="dmx-date-picker" dropsup="true" dmx-bind:value="varToday.datetime.formatDate('dd-mm-yyyy')" format="DD/MM/YYYY">

Anyone?

Run in your browser console:

dmx.parse("varToday.datetime.formatDate('dd-mm-yyyy')")
// or
dmx.parse("content.varToday.datetime.formatDate('dd-mm-yyyy')")

Does it show the date ok?

1 Like

Good catch. It didn't
I changed it to dd-MM-yyyy and now it shows...

Thank you @Apple !