Object doesn't support property or method 'from'
See original GitHub issueI get the error message in the title when running my simple application in the IE.
In chrome everything is just fine.
The error points to the dayPicker.js file on line 128 in the function _toConsumableArray(arr)
.
Any ideas on this?
this is my wrapper component
import React from 'react';
import moment from 'moment';
import { SingleDatePicker, toMomentObject } from 'react-dates';
import toLocalizedDateString from './../../utils/toDateString';
class SingleDatePickerWrapper extends React.Component {
constructor(props) {
super(props);
this.format = 'DD.MM.YYYY';
this.state = {
focused: false,
};
}
onDateChange = (date) => {
this.props.onBlur(toLocalizedDateString(date, this.format));
}
onFocusChange = ({ focused }) => {
this.setState({ focused });
}
render = () => {
const { focused } = this.state;
let newProps = {};
if (!this.props.onlyFuture){
newProps = { ...this.props, isOutsideRange: () => {} };
} else {
newProps = { ...this.props };
}
return (
<SingleDatePicker
{...newProps}
id="date_input"
date={toMomentObject(this.props.date, this.format)}
focusedInput={'endDate'}
focused={focused}
displayFormat={'DD-MMM-YYYY'}
onDateChange={this.onDateChange}
onFocusChange={this.onFocusChange}
/>
);
}
}
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Object Doesn't Support this Property or Method - Microsoft Learn
The "object doesn't support this property or method" error occurs when you try to use a method or property that the specified object...
Read more >IE 11 AngularJS error - Object doesn't support property or ...
When I open this in IE11 I get the error in a popup SCRIPT438: Object doesn't support property or method 'from' which is...
Read more >Object Doesn't Support This Property or Method Error
This error occurs when you are trying to use a method/property that the specified object does not support (i.e. it is not found...
Read more >Object doesn't support property or method 'from': IE11 #63
The following code will give a 'error: Object doesn't support property or method 'from''. It is part of the inline script.
Read more >Object Doesn't support property or method '$1X'
First of all, sp.js IS loaded when you execute your code, otherwise you will get a "undefined" error message when calling "SP.ClientContext.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Alternatively, you can use https://www.npmjs.com/package/airbnb-js-shims
Babel converts the ES2015 spread operator (
[...array]
) to the_toConsumableArray
helper function.http://babeljs.io/repl/#?presets=es2015&code=[...array]
This uses ES2015 Array.from which is not available in IE. You can use Babel’s polyfill for this:
http://babeljs.io/docs/usage/polyfill/