I am using DateTimePicker from "react-rainbow-components", I want to call the custom method once we click on the action button like "OK" or "Cancel". I am not sure how we can't do it, since as per the documentation of DateTimePicker it doesn't accept any props to handle that, is this any other workaround we do it solve this problem?
import { DateTimePicker } from "react-rainbow-components";
import { useState } from "react";
export default function App() {
const [initialState, updatedState] = useState(new Date());
return (
<div className="App">
<DateTimePicker
value={initialState}
minDate={new Date(2022, 0, 4)}
maxDate={new Date()}
label="DateTimePicker Label"
onChange={(value) => updatedState(value)}
/>
</div>
);
}

Here is a work-around solution using
okLabelandcancelLabelprops. You can listen click events ofokLabelandcancelLabelby passing them as a jsx param.This is the React code:
And this is the related css:
You can take a look at this stackblitz for a live working example of this work-around solution.