Date picker doesn't display date

Using a date picker inside a form doesn’t display a default value. The value is clearing being retrieved from the database (I can see it in several places). However, the date picker displays the default value as “mm/dd/yy” without the actual date filled in.

Hmmmm I just tried this and it seemed to work for me. You have the initial value set to something like {{ table1.selectedRow.data.date }} ?

@pdamato If you can share a screenshot of the date picker’s settings that would be great!

I basically seem to be having the same issue (text input with date input type in a form not showing default value)

@alex-w

My settings are as follows:


As can be seen, the date value exists. But within the form, it is not displayed
image

I've also tried changing the default value to {{Date(currentChild.value.Birthday)}} and {{moment(currentChild.value.Birthday)}}, but also to no avail.

Hey @dan! So I’ve been trying to repro this myself, and I can’t - I have a hunch that this is actually related to the date format and not the fact that the component is in a form. Can you try the following two things and let me know what happens?

  • Move the textinput out of the form and reset the default value (will isolate if it’s an issue with the form or not)
  • Update the format of the default value to {{ moment(currentChild.value.Birthday).format('YYYY-MM-DD') }}

Let me know!

2 Likes

Hello @justin
You are very correct!
moment(currentChild.value.Birthday).format('YYYY-MM-DD') is working flawlessly.
Thank you for the help

1 Like