Hello,
I have a Dropdown with themes and when changed i dynamically Change theme of Kendo Scheduler. Doing so works fine in Firefox and Safari Browsers but Problem Comes on IE 11 browser. The theme is changed successfully but the Scheduler Navigation arrow is missing and also the calendar Icons for datetimepicker is missing. Attached the Images how it Looks on FF and IE 11.
Here is the jquery method for dynamic theme Change.
function ResetTheme(data) {
var skinName = data;
//alert(skinName);
var skinRegex = /kendo\.[\w\-]+(\.min)?\.(.+)/i;
var themeLink = $("head link").filter(function () {
return (/kendo\./gi).test(this.href) && !(/common|rtl|dataviz/gi).test(this.href);
}); var currentThemeUrl = themeLink.attr("href");
var newThemeUrl = currentThemeUrl.replace(skinRegex, "kendo." + skinName + "$1.$2"); var newLink,
doc = document,
exampleElement = $("#example"),
less = window.less,
isLess = /\.less$/.test(themeLink.attr("href"));
if (kendo.support.browser.msie && kendo.support.browser.version < 11) {
newLink = $(doc.createStyleSheet(newThemeUrl));
} else {
newLink = themeLink.eq(0).clone().attr("href", newThemeUrl);
themeLink.eq(0).before(newLink);
}
// alert(currentThemeUrl + ' ' + newThemeUrl);
themeLink.remove();
if (isLess) {
$("head style[id^='less']").remove(); less.sheets = $("head link[href$='.less']").map(function () {
return this;
}); less.refresh(true);
}
if (exampleElement.length) {
exampleElement[0].style.cssText = exampleElement[0].style.cssText;
}
};
Let me know how can i fix it for IE 11 browser.
Thanks
Anamika
I have a Dropdown with themes and when changed i dynamically Change theme of Kendo Scheduler. Doing so works fine in Firefox and Safari Browsers but Problem Comes on IE 11 browser. The theme is changed successfully but the Scheduler Navigation arrow is missing and also the calendar Icons for datetimepicker is missing. Attached the Images how it Looks on FF and IE 11.
Here is the jquery method for dynamic theme Change.
function ResetTheme(data) {
var skinName = data;
//alert(skinName);
var skinRegex = /kendo\.[\w\-]+(\.min)?\.(.+)/i;
var themeLink = $("head link").filter(function () {
return (/kendo\./gi).test(this.href) && !(/common|rtl|dataviz/gi).test(this.href);
}); var currentThemeUrl = themeLink.attr("href");
var newThemeUrl = currentThemeUrl.replace(skinRegex, "kendo." + skinName + "$1.$2"); var newLink,
doc = document,
exampleElement = $("#example"),
less = window.less,
isLess = /\.less$/.test(themeLink.attr("href"));
if (kendo.support.browser.msie && kendo.support.browser.version < 11) {
newLink = $(doc.createStyleSheet(newThemeUrl));
} else {
newLink = themeLink.eq(0).clone().attr("href", newThemeUrl);
themeLink.eq(0).before(newLink);
}
// alert(currentThemeUrl + ' ' + newThemeUrl);
themeLink.remove();
if (isLess) {
$("head style[id^='less']").remove(); less.sheets = $("head link[href$='.less']").map(function () {
return this;
}); less.refresh(true);
}
if (exampleElement.length) {
exampleElement[0].style.cssText = exampleElement[0].style.cssText;
}
};
Let me know how can i fix it for IE 11 browser.
Thanks
Anamika