Fixed duplicate ID issue for date time picker.
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user