[ReactiveWeb][DatePicker] Calendar isn't updated with previous selection

Hello to all,

I have a problem using the DatePicker from OutsystemUI on Reactive Web.

The problem is related to the Calendar and the InitialDate config.

Everything seems to work nicely until you set an InitialDate on the component so that, i.e., you can edit a previously selected date. The calendar is never updated to jump to that particular date, it just sits on the CurrDate.

Anyone else has this problem?

Thanks.

Pedro Fernandes wrote:

Hello to all,

I have a problem using the DatePicker from OutsystemUI on Reactive Web.

The problem is related to the Calendar and the InitialDate config.

Everything seems to work nicely until you set an InitialDate on the component so that, i.e., you can edit a previously selected date. The calendar is never updated to jump to that particular date, it just sits on the CurrDate.

Anyone else has this problem?

Thanks.

Hi Pedro can you take a print of the configuration on the DatePicker or upload your oml?


Yes of course.


Hi Pedro, Here Is working fine I added onInitiaze event to assign an initial date, check the oml and see what is different on yours

Sample here



Hope I could help you

Best Regards

Carlos Lessa

If you open the calendar does it jump to the Date2?

Pedro Fernandes wrote:

If you open the calendar does it jump to the Date2?

Yes it does in the beggining

on load of the page:

on open:

on select:

on close:

On onOpen the previous date isn't selected on your Calendar. Maybe this isn't even a feature but I would imagine/assume that it should be possible to gotoDate on the Calendar, when you have a previous selection.

Anyone knows how this may be achieved? Or in fact this is a bug?

Pedro Fernandes wrote:

On onOpen the previous date isn't selected on your Calendar. Maybe this isn't even a feature but I would imagine/assume that it should be possible to gotoDate on the Calendar, when you have a previous selection.

Hi Pedro, that I think isn't a bug cuz the selected blue just appear when you effectively choose a date, the grey one is the CurrDate, and the date on the input is the date you selected as the initial date selected in the widget.

To achieve that blue selected mark on the initial date you need to use JS to add the class is-Selected on the day from initial date


Hi Carlos,


I getting really confused with the point of the initial date there? You set that field but nothing happens?


So I cheked on the pickadate github, and this should be the behaviour, I quote:

"defaultDate the initial date to view when first opened"


Nevertheless, the bug doesn't seem to be on the outsystems side, but on the pickadate, screenshots below


Initial date: adddays(currdate(),-1) = 30.04.2020, since today is 01.05.2020


Debug on the javascript (variable ok)

Result (not selected):

Hello again guys,

Anyone willing to share how they managed to bypass this issue on the calendar?

Thanks