Hi,

I am using the DatePicker widget to select an interval of dates. I don't know why, but it is only selecting the startDate, and the endDate always comes empty.

Does anyone have an idea of why this is happening? Maybe it's a silly mistake but I'm not seeing where...

I already tried with the onSelect and onClose events and none of them works...


Attached goes an oml with the example. 



Hi André,

I'm not sure why it's not working for you. 

I have attached your OML and implemented the onSelect event. It's working as expected.

Try and see if it works for you.

Regards,

Nordin

Hi André,

Looking at the comments of the widget, the value will be returned using the event OnSelect.

The problem is that the event is triggered 2 times, one when selecting the initial date and one when selecting the final date. If you do some logic (that both dates are filled it should work).

Does this makes sense?


Cheers.

Hélder Anselmo wrote:

Hi André,

Looking at the comments of the widget, the value will be returned using the event OnSelect.

The problem is that the event is triggered 2 times, one when selecting the initial date and one when selecting the final date. If you do some logic (that both dates are filled it should work).

Does this makes sense?


Cheers.

I did exactly that :)


Nordin Ahdi wrote:

Hélder Anselmo wrote:

Hi André,

Looking at the comments of the widget, the value will be returned using the event OnSelect.

The problem is that the event is triggered 2 times, one when selecting the initial date and one when selecting the final date. If you do some logic (that both dates are filled it should work).

Does this makes sense?


Cheers.

I did exactly that :)


If in your case you can only proceed with the 2 dates, once one is not filled just ignore the request.It will be a fire-forget towards the server. :)


Yes additional feedback to the user is needed in case only one date is picked. I'm sure André can manage those additional checks :).

The purpose was to demonstrate how to get both a StartDate and an EndDate selected using the DatePicker widget.

Nordin Ahdi wrote:

Yes additional feedback to the user is needed in case only one date is picked. I'm sure André can manage those additional checks :).

The purpose was to demonstrate how to get both a StartDate and an EndDate selected using the DatePicker widget.

And it kind of makes sense, since the Trigger is generic and you do select one date, even if it is the initial one.


Anyway, Good luck @Andre Vieira.


hi Andre I attach the oml with the changes, here is working with this config: