semantic-ui-calendar-react
Version:
date/time picker built from semantic-ui elements
21 lines (18 loc) • 440 B
text/typescript
/** Return true if run on Internet Explorer. */
const checkIE = () => {
if (typeof window === `undefined`) {
return false;
}
const navigator: Navigator = window.navigator;
if (!navigator) {
return false;
}
if (navigator.appName === 'Microsoft Internet Explorer'
|| !!(navigator.userAgent.match(/Trident/)
|| navigator.userAgent.match(/rv:11/))
) {
return true;
}
return false;
};
export default checkIE;