Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Error as - TypeError: __WEBPACK_IMPORTED_MODULE_13_clsx___default(...) is not a function. Since installed material-ui-pickers with redux-form #923

Closed
storesbuzz opened this issue Feb 18, 2019 · 1 comment

Comments

@storesbuzz
Copy link

storesbuzz commented Feb 18, 2019

I am getting an error as - TypeError: __WEBPACK_IMPORTED_MODULE_13_clsx___default(...) is not a function. Since material-ui-pickers installed.

I am using it with redux-form and error as below.

TypeError: __WEBPACK_IMPORTED_MODULE_13_clsx___default(...) is not a function
ModalDialog
E:/ProjectX/App/ClientApp/node_modules/material-ui-pickers/dist/material-ui-pickers.esm.js:719
716 | role: "dialog",
717 | onClose: onDismiss,
718 | classes: {

719 | paper: clsx(classes.dialogRoot, (_b = {}, _b[classes.dialogRootWider] = wider, _b[classes.dialogWithTabs] = showTabs, _b))
720 | }
721 | }, other), createElement(EventListener, {
722 | target: "window",

A GIF or MEME to give some spice of the internet

Environment

Tech Version
material-ui-pickers ^2.2.1
material-ui 3.6.0
React ^16.6.3
Browser Crome
Peer library date-fns & also with moment

My Code

  1. Date Picker renderer -
    `export const renderDateField = props => {
    const {
    timezone,
    dispatch,
    label,
    input: { onChange, value },
    meta: { touched, invalid, error },
    ...custom
    } = props;

const valueWithTimeZone = new Date();
//const valueWithTimeZone = momentTz.tz(value, timezone)

return (
<DateTimePicker
// className=""
// error={touched && invalid}
// helperText={touched && error}
margin="normal"
value={valueWithTimeZone}
onChange={onChange}
// fullWidth
// variant={variantType}
// {...input}
{...custom}
/>
);
};`

  1. Index Page -
    <Field name="date" type="date" component={renderDateField} validate={[requiredVald]} />

Steps to reproduce

  1. Every thing was working
  2. Installed material-ui-pickers
  3. Getting Erorr

Expected behavior

Not working at present

Actual behavior

Should load Date Picker

@dmtrKovalenko
Copy link
Member

Duplicate of #894

@dmtrKovalenko dmtrKovalenko marked this as a duplicate of #894 Feb 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants