Closed ghost closed 7 years ago
key: 'handleDropdownLinkClick',
value: function handleDropdownLinkClick(e) {
e.preventDefault();
var url = e.currentTarget.getAttribute('href');
if (this.state.isCrappyIE && ****(e.currentTarget.getAttribute('class') === 'ical-link' || e.currentTarget.getAttribute('class') === 'outlook-calendar-link'))**** {
var blob = new Blob([url], { type: 'text/calendar' });
window.navigator.msSaveOrOpenBlob(blob, 'download.ics');
} else {
window.open(url, '_blank');
}
this.toggleCalendarDropdown();
}
i think attributes enclosed in **** are not required, when i am removing them, i am able to download the file in ie as well
Sorry for the delayed response.
Thank you for bringing this to my attention. The latest build 0.0.8 fixes the problem. This has been released to NPM. Please let me know if you should have further issues.
function _getUrl_ics(data) {
var startTime = formatTime(data[Count].Days);
url = encodeURI(
'data:text/calendar;charset=utf8,' + [
'BEGIN:VCALENDAR',
'VERSION:2.0',
'BEGIN:VEVENT',
'URL:' + document.URL,
'DTSTART:' + (startTime),
'DTEND:' + (startTime),
'SUMMARY:' + (data[Count].TaskName || ''),
'DESCRIPTION:' + (''),
'LOCATION:' + (''),
'END:VEVENT',
'END:VCALENDAR'].join('\n'));
var IsIE = false;
if ((navigator.userAgent.indexOf("MSIE") != -1) || (!!document.documentMode == true)) //IF IE > 10
{
IsIE = true;
}
if (IsIE) {
var blob = new Blob([url], { type: 'text/calendar' });
window.navigator.msSaveOrOpenBlob(blob, 'download.ics');
}
Count = Count + 1;
}
it is not working for me. Help someone
Although it is working fine in chrome