Rails 7 Flatpickr disable time and date

66 views Asked by At

Currently I am working on a booking app and I am trying to disable times based on bookings already created. However, I only see documentation to disable a whole day/range of days. Is it possible to do something like this? And if not, are there libraries out there that can handle this with Rails 7? Thank you!

flatpickr_controller.js

Currently supported:

 disable: [
        {
            from: "2023-10-10",
            to: "2023-10-10"
        },
       
    ]

My requirement:

 disable: [
        {
            from: "2023-10-10 1:00 PM",
            to: "2023-10-10 2:00 PM"
        },
       
    ]
1

There are 1 answers

1
WALVISK On

i don't think they have that feature yet, CMIIW

https://github.com/flatpickr/flatpickr/discussions/2841