[Date Range Picker] How to add time input?

Forge Component
(3)
Published on 2019-07-10 by Matheus Medeiros
3 votes
Published on 2019-07-10 by Matheus Medeiros

Hi All,


I am having difficulties passing a time input to the widget. 

The StartDate and EndDate are DateTime variables but only the date is being passed onto the widget, it always seems to show either 12am or 1am for both dates no matter what. 


How do I pass the hour variables in OutSystems as per the documentation?
http://www.daterangepicker.com/#example2 

Hi, dude.

I think that source of your problem might be the DateFormat inserted on the widget settings ("YYYY HH:mm", on the screenshot). 

Some time ago, i faced a huge problem setting the DateFormat, as you are facing now. Aparently, my problem was caused by a bug of the widget, which makes the DateTime always null. 

Try to format your DateTime with some mask and keep the DateFormat empty. Maybe it can help.


Hello Andrew,

Could you please check the default value of your inputs and is it in date time format?

Regards

Prajakta Roshankhede 

Prajakta Roshankhede wrote:

Hello Andrew,

Could you please check the default value of your inputs and is it in date time format?

Regards

Prajakta Roshankhede 

Hi Prajakta, yes, my variables are DateTime as I mentioned in my post. I did some digging around and the issue is with the component itself has those input variables as Date only:

... there is no way to input a specific time input into this component (as is) unless someone can prove me wrong.

I already contacted Matheus to help to modify this but it has been radio silence so far. I might modify the component myself (it is not as simple as changing that Data Type to DateTime (I already tested that) as there are some actions to format the dates/times in the Javascript

This component also needs a few modifications as highlighted by others in this component discussion board it could be a good chance to get a few of us to help make it a better one, anyone up for it?