[Solved] Setting the date_input value

I want to add a screen in my app with personal information name, gender, date of birth and to set them once save button is pressed. But I have a problem with setting date of birth. When I close and open again the app the name and gender is like I entered them, but I have to select birth date again. I tried doing this with local storage. Maybe you can help me solve this problem.

1 Like

Hi,

It looks like you didn’t hook up the value block to the Date_Input1 setter block. It also looks like you currently have it to set Style rather than Text. Can you try fixing that and let us know if you’re still having an issue?

I cannot set to text, because I don’t have the option.

Capturestyle

I see. I didn’t realize we didn’t have any way for the visible date to be set on our Date Input component. I will look into it and see if that is something we can enable.

A potential workaround is to hide the Date Input and use a regular text input or label. You can set the value like you did with your other components and use the onClick event to show the date picker. I know that isn’t ideal but it should work right now while we try to work on a better solution.

3 Likes

@ieremie.mariae0ximv This is what I do to transfer/save my dates. I use the Date input and save that in a stored or cloud variable. I then use a Label to display the stored Date information. It works really well.

3 Likes

Hi! I used your solution and it works very well for what I need. Thank you for your suggestion.

1 Like

Awesome! Can you mark it as solved and the solution so other people can find what worked for you right away?

Any ETA on a SET block for the date picker?

Sorry, don’t have an ETA at the moment but it is on my to do list. So hopefully it is something we can address soon.

Hi Steven
Any news on this this? I really need to be able to set the date value to what’s in the DB and not have it default to “today” as this creates “user” problems.