As per documentation ant design 4.7
onChange Callback function, can be executed when the selected time is changing function(dates: [moment, moment], dateStrings: [string, string])
Error
Type '(date: Array<Moment>, dateString: Array<string>) => void' is not assignable to type '(values: RangeValue<Moment>, formatString: [string, string]) => void'.
Types of parameters 'date' and 'values' are incompatible.
Type 'RangeValue<Moment>' is not assignable to type 'Moment[]'.
Type 'null' is not assignable to type 'Moment[]'.
Code
const dateTimeOnChange = (
date: Array<Moment>,
dateString: Array<string>
): void => {
console.log(date);
console.log(dateString);
};
Can't find type definition for and design RangePicker onChange 1st parameter type.