Disable months in year view

2 posts, 0 answers
  1. Saranya
    Saranya avatar
    10 posts
    Member since:
    Apr 2013

    Posted 10 Sep 2014 Link to this post

    Hi,

    I need a month in the YEAR view to be visible but disabled. I.E I do not want to set the max date for the datepicker but want the month to have a CSS that shows it to be disabled (like background-color:lightgray)

    This works nicely for MONTH view :

    I tried with the below code but it did not work. Invalid template error.
    Do we have any template for YEAR view to customize month display?

    startpicker.setOptions({
         format: "MMMM, yyyy",
         value: startPickerValue.getMonth(),
         month: {
             content: "<div style='background-color:#= data.date < ($('#startDatePicker').data('kendoDatePicker').max()) >  ? 'cyan'  : 'lightgray' #'>#=data.value#</div>"
         }
     });



  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 10 Sep 2014 Link to this post

    Hello Saranya,

    Kendo UI Calendar provides templates only for the month view and templates for the other views are not supported. One possible way to control the rendered HTML is to wire the navigate method of the widget and find the corresponding table. Here is a simple Dojo demo, which shows how to do this.

    Regards,
    Georgi Krustev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
Back to Top