We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Want to freeze certain cells of scheduler for only new patient appointments

We have a requirement where we want certain cell(s) to be freeze for only new patient appointment(s) and the cell(s) should show some sort of text and can have some background color. If a user drags an existing appointment of type follow up appointment or if a user tries to create an appointment of type follow up in new patient to a cell(s) which is/are freezed for only new patient appointments then a validation should pops up and it is just a soft validation and the user can still books new appointments or rearrange existing follow up appointment(s) in new patient freeze cells.

1 Reply

KK Karthigeyan Krishnamurthi Syncfusion Team July 8, 2019 11:58 AM UTC

Hi Ankush, 
 
Syncfusion greetings. 
 
In the below sample, color is applied to all the cells and text is rendered for particular cells. When an event is created/dropped in the text cells, alert will be displayed (using actioBegin event) before inserting the event in those cell. 
 
onActionBegin(args) { 
    if (args.requestType == "eventCreate" || args.requestType == "eventChange") { 
      var date = args.data[0] || args.data; 
      if ((date.StartTime.getFullYear() == 2019 && date.StartTime.getMonth() == 0 && (date.StartTime.getDate() == 7 || date.StartTime.getDate() == 9) && (date.StartTime.getHours() == 10 || date.StartTime.getHours() == 11)) || date.EndTime.getFullYear() == 2019 && date.EndTime.getMonth() == 0 && (date.EndTime.getDate() == 7 || date.EndTime.getDate() == 9) && (date.EndTime.getHours() == 10 || date.EndTime.getHours() == 11)) { 
        alert("Only for new patient"); 
      } 
    } 
  } 
 
Regards, 
Karthi 


Loader.
Live Chat Icon For mobile
Up arrow icon