I encountered a problem when using the DatePicker component from OutSystems UI web. The component works fine as long as the DateFormat attribute is left empty. But when the formatting is set, to for example "DD-MM-YYYY", the variable is emptied. This makes it unable to use the selected date in a Save action. The input form will change to "Invalid Date".

I added an .oml and on the screen "RequestDetail" I tested the DatePicker. 

In this screen I added a local variable which will be set to the selected date in the event OnSelect. I added a button which shows the Date linked to the input from the aggregate and the local variable in a Feedback Message. When I change the Date and than press the button, the Date in the input will change to "Invalid Date" and the FeedBack Message will show the variable linked to the variable as "1900-01-01"  and the local variable not linked to it as the selected Date. See the attached image. 

When I link the local variable to the input form and set the value of the aggregate in the OnSelect event to the selected Date, the local variable gets emptied and the other variable keeps it value. 

I think that it goes wrong when formatting the date and presenting it to the user, but this happens in the component and in the Javascript code (I think).

Has anyone else encountered this problem? 

I do not want to clone OSUIWeb and edit this component, so for now I'm not using the DateFormat attribute as a solution.

Screenshots to clarify the problem.

Initial situation: The Date shows when loading the screen. 

When selected a new Date: The input form shows Invalid Date. The variable linked to the input form is empty, but not the local variable that is also set in the OnSelect Event. 

Hello SeabassW, how are you?

What version of Service Studio you are using? I've tried reproducing the behaviour using 11.0.208.0 but the Edit Request page seems to be working fine, see the .gif below.


Hi,

For some reason the DatePicker doesnt work well with formats thats why I use the CustomMask component to take care of that part. In attachment you can see how I did it. But don't publish my module because I had to delete a couple of stuff to be able to publish it on my environment.

Regards,

Marcelo

Thanks for replying! Im using Service Studio 11.0.406.0 with OutSystems UI Web version 1.5.1. 

Jay Santos wrote:

Hello SeabassW, how are you?

What version of Service Studio you are using? I've tried reproducing the behaviour using 11.0.208.0 but the Edit Request page seems to be working fine, see the .gif below.




Marcelo Ferreira wrote:

Hi,

For some reason the DatePicker doesnt work well with formats thats why I use the CustomMask component to take care of that part. In attachment you can see how I did it. But don't publish my module because I had to delete a couple of stuff to be able to publish it on my environment.

Regards,

Marcelo


That seems like a good solution. I will try that soon! Thank you!