Block scheduler by default and assign when somebody is available

Hi,

I'm working on a project where a person should assign when he/she is available for appointments. What I can find is that cells can be blocked, but I want it the other way around. So that the scheduler is blocked by default and you can assign when somebody is available.

Thanks for your help.

Klaas


3 Replies

NR Nevitha Ravi Syncfusion Team June 23, 2021 12:55 PM UTC

Hi klaas,


Greetings from Syncfusion Support.


You can try readonly property of scheduler by setting false it will block user to perform CRUD actions. When user is avail, you can set dynamically readonly as true so that they can work on scheduler by performing CRUD actions in it. Please refer to the following demo sample in which readonly is set to true.


Kindly try the above solution and let us know if this helps to meet your requirement.


Regards,
Nevitha




KL Klaas replied to Nevitha Ravi June 23, 2021 06:03 PM UTC

Hi Nevitha,

Thanks for your suggestion. It's not exactly what I need. But I think I've found a solution. When I create my dataset (remote), I've the following process (in my simplified example I use 1 day, say June 1st, 2021):

  • In a form the user can add his/her availability like:
    • 09:00 - 12:00
    • 14:00 - 16:00
  • When I render the dataset for the user, I loop through the availability for this user and create blocked appointments   like this:
    • StartTime: 2021-06-01 00:00, EndTime: <start time of the first available slot the user added>
    • StartTime: <end time of the first available slot the user added>, EndTime: <start time of the next available slot the user added>
    • etc.
  • When the schedular is rendered, people can only plan for this resource in the available slots.
Best regards,

Klaas




NR Nevitha Ravi Syncfusion Team June 24, 2021 03:47 AM UTC

Hi Klaas, 

Thanks for your update. 

We are happy that you have achieved your requirement. Please let us know if you need any further assistance. 

Regards, 
Nevitha 


Loader.
Up arrow icon