8
Views
7
Comments
Solved
DatePicker not displaying nulldate() correctly
Application Type
Traditional Web

Hi guys,

I need some help with the DatePicker please!

I have set the below variable to NullDate() but when the screen runs, it defaults to CurrDate(). Weird thing is when I save this, it is being stored correctly ass NullDate() but its just not displaying correctly to the user! The data type of the local variable (DateOfIssue) is Date and the default value is set to NullDate().

I feel like I'm being stupid and missing something minor to make this work!

Thanks,
Asha

Rank: #55
Solution

Hi Asha,


I was checking an example and I didn't have this issue, OML in attachment.

I noticed nonetheless, that I am using a different version of OutSystems UI as my DatePicker (I'm assuming you are using OutSystemsUI's DatePicker) has different options than yours:



TWTestDatePicker.oml

Rank: #4752

Yay this worked! I was using the DatePicker from Web Patterns! The one from OutSystemsUIWeb works a lot better! Thanks!!

Rank: #55

Hi Asha,


Can you confirm that your variable DateOfIssue does not have the Default Value = CurrDate() or you are not assigning CurrDate() to it on Preparation

That would explain why the value of the date picker is being set to CurrDate().


Regards,
João

Rank: #4752

Hi,

No assign in the preparation, just setting the default value to null as per below.

Rank: #4752

Also when I debug, I can see that the variable is definitely set to null.

Rank: #55

You have your Input Type = Text, can you try set it up to Date instead?

Rank: #4752

Date isn't an option

Rank: #55
Solution

Hi Asha,


I was checking an example and I didn't have this issue, OML in attachment.

I noticed nonetheless, that I am using a different version of OutSystems UI as my DatePicker (I'm assuming you are using OutSystemsUI's DatePicker) has different options than yours:



TWTestDatePicker.oml

Rank: #4752

Yay this worked! I was using the DatePicker from Web Patterns! The one from OutSystemsUIWeb works a lot better! Thanks!!