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

Scheduler (limiting the views)

Hello everybody,
I have a question with the scheduler. We want use it as holiday marker inside our app for achieving this:
1. we need to disable other views than month. So no view for today/ workweek,
2. we want to mark all holiday day (we have a source)(different color or readonly) In the doc i have not found nothing about point one and two.
Do you think is it possible?




3 Replies

NR Nevitha Ravi Syncfusion Team May 20, 2019 09:25 AM UTC

Hi Giorgio, 

Greetings from Syncfusion Support. 

We have prepared a sample to achieve your requirements which can be downloaded from the following link. 

  • To have month view alone in the scheduler, use views property.
    <e-schedule-views> 
        <e-schedule-view option="Month"></e-schedule-view> 
    </e-schedule-views> 
 

  • To disable Today button use the following CSS.
    button#e-tbr-btn_3 { 
        display: none; 
    } 
 
  • To make the event read-only, set true to the field isReadonly within the dataSource.
        public List<AppointmentData> GetScheduleData() 
        { 
            List<AppointmentData> appData = new List<AppointmentData>(); 
            appData.Add(new AppointmentData 
            { 
                Id = 1, 
                Subject = "HoliDay", 
                StartTime = new DateTime(2019, 5, 22, 0, 0, 0), 
                EndTime = new DateTime(2019, 5, 23, 0, 0, 0), 
                IsAllDay = true, 
                IsReadonly = true 
            }); 
            return appData; 
        } 
 
        public class AppointmentData 
        { 
            public int Id { get; set; } 
            public string Subject { get; set; } 
            public DateTime StartTime { get; set; } 
            public DateTime EndTime { get; set; } 
            public Boolean IsAllDay { get; set; } 
            public Boolean IsReadonly { get; set; } 
        } 
 

Note: If you want to make the cell of holiday event as read-only then use isBlock 

Please try out the solutions and let us know if you need any further assistance. 
 
Regards, 
Nevitha 



GI Giorgio May 21, 2019 01:48 PM UTC

Thanks,
very satisfied of the results.
Best Regards,
Giorgio.


KK Karthigeyan Krishnamurthi Syncfusion Team May 22, 2019 05:28 AM UTC

Most welcome Giorgio 😊 


Loader.
Live Chat Icon For mobile
Up arrow icon