DatePicker not working for AdvancedFormatJSON
Application Type
Traditional Web
Service Studio Version
11.10.15 (Build 40207)
Platform Version
11.0.1000.1

Once i  set the advancedjsonformat as "{'position': 'top left'}", the datepicker didn't work anymore. No popup picker is shown. please advise what wrong i have made.


Thank in advance


mvp_badge
MVP
Solution

Hi Jessica,


It doesn't seem odd, given what I explained before: the widget you're using is from OutSystemsUI, which leverages on javascript loaded in OutSystemsUI layouts.

If you managed to solve your problem, please mark the answer(s) that solved your problem so other community members facing the same problem can find a solution for it.


Thanks,
João

Solution

Once i replace Dublin template to other, it is workable.

it is so odd......:~~~ (

mvp_badge
MVP

Hi Jessica,

I think you confuse the AdvancedFormatJSON with CSS style properties, so I don't think want to achieve should be done like that. 

However, it should also not be that the the popup doesn't show. I replicated your situation and the date picker still works ignoring your AdvancedFormatJSON value.

If you want the popup to be right aligned to the input try this:

Or even better apply a proper class name that apply the styling, as inline styles are NOT a best practice.

For more information about using AdvancedFormatJSON see: https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Traditional_Web/Web_Interfaces/Patterns/Date_Picker_Reference#See_Also

The javascript library Pickaday is used by OutSystems, for a full list of advanced configuration options you can visit:

https://github.com/Pikaday/Pikaday

Regards,

Daniel


mvp_badge
MVP

Hi Jessica Lee,


After checking the documentation for the underlying github of the widget, you can see that the property reposition should be set to false, so a reposition on the viewport does not take effect:


 

Given that said, your advance format should be as follows:



Kind Regards,
João

Thank Joao,

Sorry....it doesn't be work.... Any ideas?

mvp_badge
MVP

Hi Jessica,


Please check your syntax. You're using quotes when you shouldn't. The syntax should be something like this:


{position: ""top left"", reposition: true, disableWeekends: true}


João

It is so weird...still not workable.

What wrong it is?

mvp_badge
MVP

Hi Jessica,


I was able to get it working as you can see on the image below.


Are you binding correctly the date picker to the input or have another CSS tampering with it?

In any case, I'm sending you the OML I used to get it working like the screenshot above, perhaps it'll help you understand what went wrong.


João

TraditionalWebSandbox.oml

Thank  Joao.

Your OML is workable in my platform.

Does it be caused by Dublin template?

mvp_badge
MVP

Hi Jessica,


It most probably is indeed related to this. DatePicker is an OutSystemsUI widget and when using an OutSystemsUI layout, the LayoutWidgets is loaded, and with it all the scripts that make its components work. Below you can 


João

Solution

Once i replace Dublin template to other, it is workable.

it is so odd......:~~~ (

mvp_badge
MVP
Solution

Hi Jessica,


It doesn't seem odd, given what I explained before: the widget you're using is from OutSystemsUI, which leverages on javascript loaded in OutSystemsUI layouts.

If you managed to solve your problem, please mark the answer(s) that solved your problem so other community members facing the same problem can find a solution for it.


Thanks,
João

Thank Daniel.

However, no matter what JSON parameter i have filled, such as "{'disableWeekends': true }", it doesn't be workable.

Any ideas?

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.