Add a configuration to allow the user to enter a date directly into the input field of DatePicker
357
Views
1
Comments
New
OutSystems UI

The new DatePicker of OutSystems UI, based on flatpickr library, contrary to the old one that is now named DEPRECATED_DatePicker, based in pikaday library, doesn't allow the user to enter a date in the input by typing directly on it via a widget configuration, which makes it harder to allow that behavior.

With this idea I would like to propose to OutSystems that an option is added in the DatePicker_OptionalConfigs structure, an input of the widget, to enable this behavior. 

The flatpickr library which the new component is based on already allows such a configuration but i's not exposed by the OutSystems UI webblock.


Another alternative would be allowing the developers to extended the widget capabilities by providing an open input (that would receive a JSON) like the old DatePicker used to do. The current approach limits the extensibility of the component and this idea is the only way to improve and extended the component. 

Below was the approach to enable more functionalities of the underlying library. 

I understand the expected functionality is possible with the use of a client action that enables the behavior but it requires additional overhead for development. It needs an initialize action for every instance of the component with the required config. With this ideia I challenge the current implementation to improve development experience.

Please consider these options and allow the developers to extended the libraries.

Hi @Luís Alves!

Thank you for the detailed explanation of your idea. Currently, we are not planning to include that property as an input parameter of the pattern, because as you said we already provide a client action to achieve that use case, but it's on our radar now and if we receive more feedback this decision will be reviewed.

Regarding the AdvancedFormat parameter, that option was removed for multiple reasons, including security concerns, and as an alternative, we released new extensibility features for all the patterns with external providers, to allow developers to extend the component (you can find more info about the extensibility features in this forum post).

I understand your concerns regarding "additional overhead for development" and to avoid that repetitive work you can create a block as a wrapper with the DatePicker inside, with that property, and use your block whenever you need it, it's not the perfect solution but I hope it helps.

Sorry for not being able to help more. 
If the decision is reverted, I will let you know.

Cheers,
Jéssica M.