Hello I see that now we have events enabled for the new DatePicker widget, but I couldn't figure out how to implement it, did anyone implement it yet and has an example of it?
I don't think you're using the library capabilities properly.You're trying to use an event to do something that it doesn't. This method allows adding the provider's events so that they can trigger a callback that you pass by parameter. Meaning the logic you want needs to be included in the callback you pass in SetFlatpckrEvent which can be a javascript function that can implement that.On the provider's side, what do you find as the option to do that so that we can map it to the component?
Remember that these new functionalities to extend components using providers will be incremental so the ones available are the ones on the action SetFlatpickrConfigs and are for advanced use cases where knowing javascript is a pre-requisite for using it.
UPDATE:
In flatickr, the configuration you seem to use is one called defaultDate and currently is still not used in SetFlatpickrConfigs (which by use case should be the one you need to use)
Hello @Beto Matias
You can check the public documentation about this - here. The implementation is pretty straightforward, like passing callbacks normally in OutSystems.Could you please share the difficulties you're having and how comfortable with javascript you are?Hope it helps.
Cheers,GM
Hello @Gonçalo Martins
Thank you for the quick answer, I had not seen that link you've shared.
My difficulties arethat I'm not sure what should I select on the EventName field and how to pass for example a list of dates for those events.
Regarding Javascript my knowledge is really basic on it right now.
For reference this is how I was trying:
Have you checked the documentation and the examples described there?Could you explain what specifically didn't you found in that documentation (you can find the link on the component's page in the Documentation Tab)?The EventName are the ones the provider flatpikr.After this, if you still have douts, please share an OML with that sample.
Thank you again for helping @Gonçalo Martins
My problem now is on how to pass the object with the DateList to that action handler.
I'll attach the OML this time.
Just an updated version of what I've been trying with it.
Hi. What do you want to accomplish?You're trying to pass a callback to an event so where the list of dates enters?A callback is an action (js or client action) that will run once the event you're subscribing to is triggered.
I'm trying to pass a list of dates that would be considered events on the datepicker, like the events option that we had on the deprecated version of the datepicker
For example when the datepicker is opened it will mark the received list of dates as events.