This question is locked. New answers and comments are not allowed.
One of my coworkers recently found an issue that the MVC Calendar wasn't writing out and executing the related javascript to power the Calendar. I did an investigation and it I located the issue.
The write HTML method in Telerik.Web.Mvc/UI/Calendar/Calendar.cs is not calling base.WriteHtml(writer) as per below:
When I looked all the other related controls ComboBox, DatePicker, Editor, Grid, etc, they all call base.WriteHtml(writer) in their WriteHtml methods. I've fixed the Calendar.cs for our code base to also call base.WriteHtml(writer) as per below:
I assume the calendar should also call the base.WriteHtml(writer) but it may be possible that it doesn't for a specific reason that I'm unaware of. If it was left our with a specific reason any clarification would be helpful.
Thanks,
David Driscoll
The write HTML method in Telerik.Web.Mvc/UI/Calendar/Calendar.cs is not calling base.WriteHtml(writer) as per below:
protected override void WriteHtml(System.Web.UI.HtmlTextWriter writer){ ICalendarHtmlBuilder renderer = rendererFactory.Create(this); DefineUrlFormat(); IHtmlNode rootTag = renderer.Build(); IHtmlNode contentTag = renderer.ContentTag(); contentTag.Children.Add(BuildWeekHeader(renderer)); contentTag.Children.Add(BuildMonthView(renderer)); rootTag.Children.Add(contentTag); rootTag.WriteTo(writer);}When I looked all the other related controls ComboBox, DatePicker, Editor, Grid, etc, they all call base.WriteHtml(writer) in their WriteHtml methods. I've fixed the Calendar.cs for our code base to also call base.WriteHtml(writer) as per below:
protected override void WriteHtml(System.Web.UI.HtmlTextWriter writer){ ICalendarHtmlBuilder renderer = rendererFactory.Create(this); DefineUrlFormat(); IHtmlNode rootTag = renderer.Build(); IHtmlNode contentTag = renderer.ContentTag(); contentTag.Children.Add(BuildWeekHeader(renderer)); contentTag.Children.Add(BuildMonthView(renderer)); rootTag.Children.Add(contentTag); rootTag.WriteTo(writer); base.WriteHtml(writer);}I assume the calendar should also call the base.WriteHtml(writer) but it may be possible that it doesn't for a specific reason that I'm unaware of. If it was left our with a specific reason any clarification would be helpful.
Thanks,
David Driscoll