456
Views
7
Comments
Default value of input text
Question
Application Type
Reactive

Hello!
I have a client variable that stores a date as text. I use this variable in the input text, and I have a interaction datepicker attached to the input widget. Following documentation: https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Patterns/Using_Mobile_and_Reactive_Patterns/Interaction/Date_Picker/How_to_use_the_Date_Picker_UI_Pattern

The problem is, when the client variable has a date filled, the widget doesn't display it correctly! In the image below, we can see an expression that shows the variable with 05/10/2021 but the widget displays 17/01/2022 wich is wrong. 

Has anyone went trough this before that can help me?
Any help is appreciated! :)


EDIT:
The value is also in the widget, and not displayed :/


Also, when I remove the interaction datepicker, it works properly




2024-11-20 08-28-20
Pedro Marques

Hi Ricardo,

What's the value you have in the "Initial Date" field of your date picker? 

2021-12-29 03-29-46
Ricardo Figueiredo

Well I solved the first problem and then I tried this but it happens that I can't get the widget empty

If(Client.BeginDateLastModifiedDocs = "", NullDate(), TextToDate(Client.BeginDateLastModifiedDocs))

2024-11-20 08-28-20
Pedro Marques

There's a "StartEmpty" field you can use to make the input start empty.

For example, if you want your input to start empty when the date is null, you just need to add that condition to that field.


2021-12-29 03-29-46
Ricardo Figueiredo
2021-12-29 03-29-46
Ricardo Figueiredo

The strange part, I changed from text to date and removed both inital and startEmpty from the interactionDatepicker.

And what happens is that when I select one of the dates the other gets reseted. Then I close the PopUp and open again, both values are there.

2024-11-20 08-28-20
Pedro Marques

Can you share your oml?
Otherwise, make sure the inputs are correctly associated with your datepickers in the "InputWidgetId" property of your datepicker

2021-12-29 03-29-46
Ricardo Figueiredo

You have it here. Probably you will have tons of errors. But this issue can be seen in "PopUps"

GRC.oml
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.