522
Views
4
Comments
(Reactive) Date Picker with default values
Question

Hello all,

In my reactive app, I have a screen "CreateSurvey" where a user creates a survey and gives it a start date and an end date, by using 2 datepickers. These values are then saved to a database.

Then, I have a screen "EditSurvey" where the user should be able to change these 2 dates if needed. Therefore, when I open the edit screen, I want the start date and end date to already be set to the ones coming from the database.

However, I am not finding a way to do this, even after changing the input variables, the input prompts, the DatePickers OnSelect client actions, etc.

This is what I keep getting (I have no idea where the 20-02-2022 and 02-01-1900 are coming from...)

Does anyone know how to do this or can help me with it?

Thank you very much, I am available to share more information.

2023-10-21 19-42-11
Tousif Khan
Champion

Hello,

You have to Pass the Id from your list page by taking input parameter of your entity Identifier type,

And Filter the result according to that.

I have share sample please check

https://personal-ejuytnht.outsystemscloud.com/Pagination/SampleForList

I hope this will help

Thanks 

Tousif

Date Check_Sample.oml
UserImage.jpg
Cute Bear

Hello Tousif,

You are not using DatePickers. My variables and columns in the aggregate are DateTime, so I need to use DatePickers.

2026-03-12 06-20-48
KUNDAN CHAUHAN
Champion

Hi Cute Bear,

As per your requirement i create oml and use DatePicker as you suggest.

I'm attiching both  oml file and also  demo link:   

https://personal-ddjq2r3a.outsystemscloud.com/CreateSurvey/Surveys

It  work proper according your requirement 

please check it and if you have any doubt, 

feel free to ask ....... 

When we use DatePicker it have two parameter StartDate and EndDate so here ,set SelectInterval to False


CreateSurvey  screen

EditSurvey  screen

Thanks 

Kundan Chauhan

CreateSurvey.oml
UserImage.jpg
Cute Bear

Hello Kundan, thank you.

It seems that you are using the deprecated version of the DatePicker.

Mine looks like this:

I was able to get the dates in my EditScreen:

However, if I try to change them, it doesn't work.

For example, if I choose 4th of July:

It turns into this:

And in the console, I get this error message:

Do you happen to know why and how to solve?

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