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

error display in console #14

Open
nacimgoura opened this issue Oct 11, 2018 · 3 comments
Open

error display in console #14

nacimgoura opened this issue Oct 11, 2018 · 3 comments

Comments

@nacimgoura
Copy link

Hello,
thanks for your libraries. It works correctly but I have one error which display in console.

capture d ecran 2018-10-11 a 10 47 05

Despite the error, it works.

@vascofg
Copy link
Owner

vascofg commented Nov 27, 2018

Hi, sorry for the late reply. Can you confirm your react-admin version?

@nacimgoura
Copy link
Author

I have to remember how to reproduce the bug already 😄

@ghost
Copy link

ghost commented Jan 10, 2019

I resolve this with my own compoment :

import React from 'react'
import { DateInput } from 'react-admin-date-inputs'
import MomentUtils from 'material-ui-pickers/utils/moment-utils'

const MyDateInput = (props) => {
	const { isRequired, ...rest } = props

	return <DateInput
		options={{ format: 'DD/MM/YYYY', clearable: true }}
		parse={v => v && v.toISOString()}
		providerOptions={{ utils: MomentUtils }}
		isRequired={isRequired}
		{...rest}
	/>
}

MyDateInput.defaultProps = {
	isRequired: false,
}

export default MyDateInput

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

Successfully merging a pull request may close this issue.

2 participants