The Date Input's empty value should return null instead of an empty string. This change would allow us to use functions on dateInput.value that require a date or null. A common use case is writing a date into Retool (or any other SQL database). Currently, I use the workaround {{ dateInput1.value === '' ? null : dateInput1.value }} each time this is needed."
Hey @TobiasOhlsson! Thanks for the suggestion. You've already garnered a fair bit of community support, if the emoji reactions are any indication.
I just put this into our ticket queue and, unless there's some side effect that I'm not thinking of, it should make a good first ticket for somebody! I'll keep you updated here as soon as possible. ![]()
Hi @Darren! Any update regarding this change? It prevents us to use directly the original form datas object in case of empty dates...
Hey @sacha - we likely won't update the default behavior of the component's value attribute when no date is selected, but are considering a toggle that would allow it to be null instead of ''. Our primary reasoning is that the current behavior aligns with that of a native <input type="date" /> element.
Either way, I'll provide an update here as soon as there is movement on this!
Hi @Darren,
Any news?
This is a really annoying issue since I now have to write multiple queries instead of just being able to use one and giving it NULLs.
Are you and the team also looking into doing the same for text and select components?
I just want to be able to use NULLs if there is no data ![]()
/edit: In the meantime Iām working around this issue by using value || null