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?

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

i dont want forge components, i need i create for i can see how it works

mvp_badge
MVP

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

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


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.



Hello Franc,

 For this requirement I will suggest you to use Editable Table Forge component. You don't need to open a new screen or pop-up just to edit your data. You can do it table itself and will be good practice also. 

This is the link for component: https://www.outsystems.com/forge/component-overview/8659/editable-table-reactive-sample 

If you don't want to use this component, just download it and see how it is implemented and you can do same for your table.

Hope it helps!


Sanjay

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