Topic: Why is it not possible to use disabled dates and times in the date time picker tool?

Haugsted pro asked 5 years ago


Hi
I am having issues creating a booking system sience it does not seem to be possible to disable certain times and dates using java script.

Is this really true ?

We are making it possible to book a facility but in order for this to work we need to be able to disable allready booked times.

Please advise.

Best Regards

Nikolaj


Mikołaj Smoleński staff answered 5 years ago


Hi Nikolaj, You can disable dates and times. For example in datepicker You can follow instructions from this page: https://mdbootstrap.com/javascript/date-picker/#disable-dates If You want to disable certain days You should prepare the following code:
$('.datepicker').pickadate({
 disable: [
  new Date(2018,06,20),
  new Date(2018,06,22)
 ]
});
  Second value is month index, so January will be '0', February '1' e.t.c. Best regards  

Haugsted pro commented 5 years ago

Hi Mikołaj Thanks for answering. I am aware of the possibillity to disable whole dates, but the thing is we are making a booking system where the ressources can be booked from hour to hour. So we only need to disable whole dates after all the individual timeslots has been booked. When we initialize the timepicker we need to disable allready booked times on a given ressource. This is what we can not find ...a possibility to disable times in the timepicker, is there any way of doing this ? Best regards Nikolaj

Mikołaj Smoleński staff commented 5 years ago

It looks like You need the date and time picker tool connected. Unfortunately, we don't provide such functionality. Our time and date pickers are two different components. Best Regards

Alexis Tufoni free commented 3 years ago

Hi bro, find me on facebook. Alexis tufoni. i find a solution for this problem... Disable only the time selected from a specific day to no repeat the booking



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags