Skip to content

Invalid type when using arrow keys to pick values #146

Closed as not planned
Closed as not planned
@jinmanm

Description

@jinmanm

I get the following error when using the arrow keys to change dates.
Failed prop type: Invalid prop `value` of type `number` supplied to `MinuteInput`, expected `string`.

My onChange function updates a state value which then renders out in the DateTimePicker.

export const DateTimePickerDialog = (props) => {

    const [datetime, setDatetime] = useState(props.datetime);

    return (
        <DateTimePicker
            maxDate={props.maxDatetime}
            minDate={props.minDatetime}
            value={datetime}
            onChange={setDatetime}
        />
    );
};

I cannot control what values get passed to the child components so is there something im missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions