21
Views
3
Comments
Solved
[OutSystems UI] DatePicker not working with input on the bottom of a screen
outsystems-ui
Reactive icon
Forge asset by OutSystems
Application Type
Reactive

We have encountered an issue with the Date Picker component in the last 2 versions of Outsystems UI.  In earlier versions, when a Date Picker was positioned near the bottom of the screen, the calendar would automatically flip to display above the input.  It is now being rendered off-screen making the component unusable.  We would like to be able to apply the other bug fixes, but the Date Picker issue is blocking us from making the update.  Is there a workaround in the meantime to fix this issue?

OutsystemsSupport.oml
2026-01-28 16-57-48
Mihai Melencu
Champion
Solution

Hi @Rebecca Hall ,

I saw you already had some JS in the OnReady, but it wasn’t working, so I updated the implementation. Since Flatpickr officially exposes the position option, this approach is much more reliable than trying to fix it with CSS alone.

You’ll need to add an Extended Class to the Date Picker container (in my example I used js-fix-datepicker). In the OnReady event you can use:

  • setTimeout(function () {
  •   const input = document.querySelector('.js-fix-datepicker input');
  •   input._flatpickr.set('position', 'above left');
  •   input._flatpickr.redraw();
  • }, 0);


OutsystemsSupport_updated.oml
2022-11-12 11-28-30
Gonçalo Martins
Staff
Solution

Hi @Rebecca Hall,

You can try adding a handler from the DatePicker Initialized event 

and then calling the client action SetFlatpickrConfigs with position = "auto"


Bets Regards,
GM




2026-01-28 16-57-48
Mihai Melencu
Champion
Solution

Hi @Rebecca Hall ,

I saw you already had some JS in the OnReady, but it wasn’t working, so I updated the implementation. Since Flatpickr officially exposes the position option, this approach is much more reliable than trying to fix it with CSS alone.

You’ll need to add an Extended Class to the Date Picker container (in my example I used js-fix-datepicker). In the OnReady event you can use:

  • setTimeout(function () {
  •   const input = document.querySelector('.js-fix-datepicker input');
  •   input._flatpickr.set('position', 'above left');
  •   input._flatpickr.redraw();
  • }, 0);


OutsystemsSupport_updated.oml
2022-11-12 11-28-30
Gonçalo Martins
Staff
Solution

Hi @Rebecca Hall,

You can try adding a handler from the DatePicker Initialized event 

and then calling the client action SetFlatpickrConfigs with position = "auto"


Bets Regards,
GM




2026-01-15 03-18-59
Vijay Malviya

Hi @Rebecca Hall 

This JavaScript can serve as an alternative solution. You may use it if it aligns with your needs. I’ve shared it for your reference. 

setTimeout(function () {

  document.querySelectorAll(".flatpickr-input").forEach(input => {

    if (input._flatpickr) {

      input._flatpickr.destroy();

      flatpickr(input, {

        position: "auto"

      });

    }

  });

}, 200);

Regards,

Vijay M.

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