react-admin-date-inputs icon indicating copy to clipboard operation
react-admin-date-inputs copied to clipboard

error display in console

Open nacimgoura opened this issue 7 years ago • 3 comments

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.

nacimgoura avatar Oct 11 '18 08:10 nacimgoura

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

vascofg avatar Nov 27 '18 22:11 vascofg

I have to remember how to reproduce the bug already 😄

nacimgoura avatar Nov 28 '18 08:11 nacimgoura

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

ghost avatar Jan 10 '19 09:01 ghost