Thank you for contacting Syncfusion support.
We have prepared the sample to display the week numbers and to hide the days in month view which can be download from the below location.
Kindly refer the below code example used in the sample.
<Code>
function onCreate() {
var obj = $("#Schedule1").data("ejSchedule");
if (obj.currentView() == "month") {
Date.prototype._getWeekNumber = function () {
var weekNo = Math.ceil((((this - new Date(this.getFullYear(), 0, 1)) / 86400000) + new Date(this.getFullYear(), 0, 1).getDay() + 1) / 7);
return (weekNo > 52) ? weekNo - 52 : weekNo;
};
var result = $.grep($(".cusRow"), function (value) { if ($(value).hasClass("cusRow")) { return value; } });
if (result.length != 0) $(".cusRow").remove();
var date = new Date(obj.currentDate());
var weekFirst = new Date(date.getFullYear(), date.getMonth(), 1);
var $tr = "<tr class='cusRow'>";
Date.prototype._currentWeekDates = function (firstdayofweek) {
var dayDiffer = this.getDay() - firstdayofweek,
start = new Date(this.getFullYear(), this.getMonth(), this.getDate() + (((dayDiffer < 0) ? dayDiffer + 7 : dayDiffer) * -1)),
end = new Date(start.getFullYear(), start.getMonth(), start.getDate() + 6);
return { start: new Date(start), end: new Date(end) };
};
for (var a = 0, len = obj._dateRender.length / 7 ; a < len; a++) {
var weekDate = weekFirst._currentWeekDates(obj._firstdayofweek);
var weekNumber = weekDate.start._getWeekNumber();
var count = 0, total = ((weekDate.end - weekDate.start) / (1000 * 60 * 60 * 24)) + 1;
for (b = 0; b < total; b++) {
if (obj.monthDays.indexOf(weekDate.start.getTime() + (1000 * 60 * 60 * 24 * b)) != -1) count++;
}
$tr += "<td colspan='" + count + "' style='padding:5px;border-left:1px solid #c3c3c3;border-bottom:1px solid #c3c3c3;text-align: center;'>" + weekNumber + "</td>";
weekFirst = new Date(weekDate.end.getTime() + (1000 * 60 * 60 * 24));
}
$tr += "</tr>";
$($tr).insertBefore(obj.element.find(".e-headerdays").find("tr:first"));
obj.element.find(".cusRow").children().first().css("border-left", "none");
if (obj.element.find(".e-horizontmonthheaderdaytd").parent().length > 0) {
// obj.element.find(".e-horizontmonthheaderdatetd").parent().remove(); // it can be used to remove the date number row
obj.element.find(".e-horizontmonthheaderdaytd").parent().remove(); // it will remove the day names
}
obj.refreshScroller();
}
}
function onComplete(args) {
if (args.requestType == "viewNavigate" || args.requestType == "dateNavigate")
onCreate();
}
.e-schedule .e-horizontalmonthtimecellsht { /*adjust the height if you wish to display only week number in month view*/
height: 59px;
}
</Code>
Regards,
Karthigeyan