如何获得1990年至2022年,甚至可能进入未来?
我想创建一个从1990年到现在的选择框。但是它返回一个错误,例如以下错误:(0,react_datepicker__webpack_imported_module_4 __. range)不是函数
mycode:
const years = range(1990, getYear(new Date()) + 1, 1);
I want to create a select and select box from 1990 to present. But it returns an error like: Uncaught TypeError: (0 , react_datepicker__WEBPACK_IMPORTED_MODULE_4__.range) is not a function
Mycode:
const years = range(1990, getYear(new Date()) + 1, 1);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
错误的含义,编译器无法找到
范围
函数。最有可能在示例中引用 lodash范围函数。您可以导入它或可以自己创建一个 -
The error means, compiler is unable to find a
range
function.Most likely in the the example it's referring to lodash range function. You can import it OR can create one yourself -