Fixed duplicate ID issue for date time picker.

This commit is contained in:
Patrick Fic
2020-10-08 16:12:46 -07:00
parent 5f73c879d0
commit 63a69a7ad7

View File

@@ -6,7 +6,7 @@ import { TimePicker } from "antd";
import moment from "moment";
//To be used as a form element only.
const DateTimePicker = ({ value, onChange, onBlur, ...restProps }, ref) => {
const DateTimePicker = ({ value, onChange, onBlur, id, ...restProps }, ref) => {
// const handleChange = (newDate) => {
// if (value !== newDate && onChange) {
// onChange(newDate);
@@ -14,7 +14,7 @@ const DateTimePicker = ({ value, onChange, onBlur, ...restProps }, ref) => {
// };
return (
<div>
<div id={id}>
<FormDatePicker
{...restProps}
value={value}