36
Views
6
Comments
Solved
How i make to select startdate and endate in datetimepicker?
Question

Hello, i have this datetimepicker and i need the user have permission to select the start and end date of period. How i do? And how i insert their date into the datatabase And one more question, how i make to make possible to edit the interval of data?

Solution

Hello Franc,


Plz find steps to use date picker to select date range and save it on DB:

Step1: Create a table/Entity with StartDate and Enddate to save range.

Step2: Drag & Drop datePicker and set Mindate and Maxdate as you need and SelectInterval as true, like below :


Step3:

Create a handler and bind local var(Start&EndDate) Start & Enddate parameter of handler :

Step4:

Assign date range to Agregate in Handler flow : 

That's it. Save your selected range in save button logic.

Demo URL : https://sanjaykumar-sahu.outsystemscloud.com/ReactivePractice/datePickerdemo 


let me know if you have any doubts.


Regards,

Sanjay


Hello Francisco,


I would like to suggest you to use a forge component DateRangePicker, Its easy to get what you need. 

Link : https://www.outsystems.com/forge/component-overview/2252/daterangepicker 

You will get all info in documentation, how to use it.


Regards,

Sanjay

Rank: #97

Hi Francisco,


When you set the Date Picker to your screen, you have a field called Set Interval which you can set to True if you want the user to select an interval:


Then you have the handler which when the user selects the interval you will receive the start and end date.


The OML in attachment with an example on how to use it.


Hope it helps.


Cheers,

João

DatePicker.oml

Solution

Hello Franc,


Plz find steps to use date picker to select date range and save it on DB:

Step1: Create a table/Entity with StartDate and Enddate to save range.

Step2: Drag & Drop datePicker and set Mindate and Maxdate as you need and SelectInterval as true, like below :


Step3:

Create a handler and bind local var(Start&EndDate) Start & Enddate parameter of handler :

Step4:

Assign date range to Agregate in Handler flow : 

That's it. Save your selected range in save button logic.

Demo URL : https://sanjaykumar-sahu.outsystemscloud.com/ReactivePractice/datePickerdemo 


let me know if you have any doubts.


Regards,

Sanjay


Rank: #667

ok guys it´s working and the last question i write, please help me with that. how i make to make possible to edit the interval of data?




I have this datatable, when the user click in the icon to edit, it opens a new screen, and i need in the new screen, appears the selected data which are in the database.