2

There are 2 best solutions below

5
On BEST ANSWER

The slots prop of DatePicker lets you override the inner components including the OpenPickerIcon, so this is how you override it:

import AccessibleIcon from "@mui/icons-material/Accessible";

//…

<DatePicker
  slots={{
    openPickerIcon: AccessibleIcon
  }}
  {...}

This is the list of icon components that can be customized:

{
  leftArrowIcon?: elementType,
  openPickerIcon?: elementType,
  rightArrowIcon?: elementType,
  switchViewIcon?: elementType
}

https://mui.com/x/api/date-pickers/date-picker/#slots

enter image description here

Codesandbox Demo

0
On

Just add the openPickerIcon property in slots of DatePicker, DateTimePicker etc to acheive it. (For adding custom svg icon)

 import CalendarIcon"../Components/CalendarIcon";
    
    //…
    
 <DatePicker
   slots={{
     openPickerIcon: CalendarIcon
    }}
/>

Create an SVG Component

import React from 'react';

import calendarSVG from './../calenderIcon/calendar.svg';

const CalendarIcon = () => (
  <img src={calendarSVG} alt="Calendar" />
);

export default CalendarIcon;