66
Views
10
Comments
Solved
Date picker disable date pick by user and holiday's
Question
Application Type
Reactive

Hello OS community!

I'm having an issue using DatePickerDisableDays here's the scenario

  • I want to disable a date if two user's have already pick that date. Date 23 of october should be disabled since it is the date that already been picked by two user but it's not working
  • I also want to disable a date if holiday entity contains value, but this one is already working

Here's my current DatePickerOnitialized and I will provide my OML

Can anyone please help to achieve this? I will truly appreciate it.

AppointmentSystem.oml
2025-12-23 12-24-14
Adão Pedro
Solution

Hi, i made some changes, very briefly you have to put the inactive days in a single list and insert and execute the DatePickerInitialized initialization when the data is loaded, for this you can put the container that contains the dstapicker inside an if.

See my changes below

AppointmentSystem_Export.oml
UserImage.jpg
Digital Hunter

Thanks @Adão Pedro  I will also try to understand this solution thanks again!

UserImage.jpg
Digital Hunter

It works now thank you so much @Adão Pedro

2018-06-05 16-54-03
Maria da Graça Peixoto

Hi! 

You need to run this "DatePickerOnitialized" action, or one similar to that, also in the OnAfterFetch of the queries GetAvailableDays and Getholidays. 

There are no guaranties that those queries have already finished when the initialize from the datepicker  runs. 

  Hope this help

Graça

UserImage.jpg
Digital Hunter

can you show me a sample on how to do this?😅

2018-06-05 16-54-03
Maria da Graça Peixoto

Sorry I didn't see you are already refreshing the queries in the action. 

this don't work but why?

let me see





 

2018-06-05 16-54-03
Maria da Graça Peixoto

Found!!!!!

You cannot use two "DisableDatePicker" widgets in the same initialize action. 

you need to create a list 

and add all the disabled days to that list 

best regards

Graça

ps - added the changed oml

AppointmentSystem1.oml
UserImage.jpg
Digital Hunter

Oh to be honest I'm not familiar with this List function. Can you send the revised OML?

2018-06-05 16-54-03
Maria da Graça Peixoto

yes

i have changed my answer but i'm sending it again


AppointmentSystem1.oml
UserImage.jpg
Digital Hunter

@Maria da Graça Peixoto thank youu I will try to implement and learn this solution

2025-12-23 12-24-14
Adão Pedro
Solution

Hi, i made some changes, very briefly you have to put the inactive days in a single list and insert and execute the DatePickerInitialized initialization when the data is loaded, for this you can put the container that contains the dstapicker inside an if.

See my changes below

AppointmentSystem_Export.oml
UserImage.jpg
Digital Hunter

Thanks @Adão Pedro  I will also try to understand this solution thanks again!

UserImage.jpg
Digital Hunter

It works now thank you so much @Adão Pedro

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