127
Views
8
Comments
Solved
[OutSystems UI] Date picker cannot select date when there are disabled weekdays
outsystems-ui
Reactive icon
Forge asset by OutSystems
Application Type
Reactive

Hi,

I am using the date picker from OutSystems UI (version 2.18.4), and I have disabled the weekends with a client action in the "initialized" event using the "DatePickerDisableWeekDays" action. I have also set today's date as the initial date. However, I am encountering an issue: when I select a date, I can only choose dates within the same week. If I try to select a date from another week, it doesn't allow me to do so. If I remove the "DatePickerDisableWeekDays" action, I am able to select any dates I want. I have included a brief video to demonstrate this odd behavior.



Has anyone else experienced this?

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

Hi @Andrea Caselli 

Sorry about the misunderstanding. I got confused by the title.
That is a known issue we have on our backlog to tackle as soon as possible, under the code ROU-4902 (for future reference in the release notes).
Unfortunately, we can't provide a workaround or ETA.

Cheers,
GM

2022-11-12 11-28-30
Gonçalo Martins
Staff

Hi @Andrea Caselli 

This seems the exact scenario already asked and answered in this post.

Cheers,
GM

UserImage.jpg
Andrea Caselli

Hi @Gonçalo Martins 

Thank you for pointing me to that discussion.

While it seems similar, the issue I described in my other post (the one you linked) involved the date range picker component, where a range could not be selected if there were disabled dates in between.

In this current scenario, my challenge is with the standard date picker. Specifically, I am unable to select a single date (not a range) from a different week. I believe that I should be able to select any date, with the obvious exception of the weekdays that I have disabled, don't you think?

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

Hi @Andrea Caselli 

Sorry about the misunderstanding. I got confused by the title.
That is a known issue we have on our backlog to tackle as soon as possible, under the code ROU-4902 (for future reference in the release notes).
Unfortunately, we can't provide a workaround or ETA.

Cheers,
GM

UserImage.jpg
Andrea Caselli

No worries Gonçalo, I will mark your reply as the solution and in the meantime I just won't use the "disableWeekdays" until the issue is fixed.

UserImage.jpg
Andrea Caselli

Hi everyone,

I've found a way to consistently reproduce this potential bug in OutSystems UI's date picker, and I wanted to ask the community for help in confirming it. I've attached an OML file with a simple reactive app designed specifically to test this behavior.

The bug occurs only the second time you select a date in the date picker. Here's how to reproduce it:

  1. Open the date picker input and select a date (any date). The date picker popup should close, and the date should be selected.
  2. Click the input again to open the date picker, then select a different date that is not in the same week as the previously selected date (for instance select a date the week after your first selected date).
  3. After selecting this second date, all subsequent dates after the initial selection will be greyed out.

I've tested this on two Macs, using both Google Chrome and Firefox, and the same odd behavior occurs in both cases. I'll be testing on a Windows machine tomorrow, but in the meantime, it would be great if someone could help verify this bug.

Please let me know if you can reproduce the issue using the attached OML.

Thank you!

testdatepicker.oml
2025-01-27 01-12-56
Manh Nguyen Danh

I encountered the same problem.

2024-08-06 11-20-33
Ronnie Verheij

You might have some success instead of using the restrictions apply the  CSS 

.rangeMode .flatpickr-day:nth-of-type(1),.rangeMode .flatpickr-day:nth-of-type(7),.rangeMode .flatpickr-day:nth-of-type(8),.rangeMode .flatpickr-day:nth-of-type(14),.rangeMode .flatpickr-day:nth-of-type(15),.rangeMode .flatpickr-day:nth-of-type(21),.rangeMode .flatpickr-day:nth-of-type(22),.rangeMode .flatpickr-day:nth-of-type(28),.rangeMode .flatpickr-day:nth-of-type(29),.rangeMode .flatpickr-day:nth-of-type(35),.rangeMode .flatpickr-day:nth-of-type(36),.rangeMode .flatpickr-day:nth-of-type(42) {    margin-top: 1px;    background: darkred !important;    cursor: not-allowed !important;    border-radius: 0px !important;    color:white !important;    user-select:none !important;    pointer-events: none !important;}

Then it's possible to do this 




2024-08-06 11-20-33
Ronnie Verheij

With restrictions I mean the DisabledDays

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