I don't think this is working properly in the IDE as well.
When parsing a string to date, the date string should either be a ISO8601 or RFC2822 date time format or you should define the pattern of the date string as well.
That makes a lot of sense. I've been caught out with date formats in other software, but hadn't had any issues in any Retool web apps using this format.
Explicitly defining the input format and required format makes good sense - I will do that.
I'm wondering what Retool's advice is for formatting dates with moment (I haven't found anything in the docs (yet)), and whether I should revisit all the dates where I used that simpler method.
Yes, Marc's suggestion works perfectly. The challenge is that the data (dates) are coming from sources, e.g. via API, and they aren't in either format, so I need to make sure they are interpreted correctly. Adding that input mask is the key from me.
Thanks for the tip with the Chrome console. I couldn't get it working as moment wasn't defined on a blank tab. That tip works on the Retool site or on momentjs.com though.