Search code examples
reactjsmaterial-uitailwind-cssdaisyuimui-x-date-picker

Tailwind DaisyUI with MUI


I'm using TW and DaisyUI as my main UI lib, but DaisyUI does not have DatePicker and MUI has a really nice one. In DaisyUI i'm using their color standarts like bg-primary

How can i add bg-primary to MUI date picker?

          <MuiDatePicker
            onOpen={() => {
              console.log('open');
            }}
            sx={{
              width: '100%',
              '& .MuiInputBase-root': {
                backgroundColor: '',
              },
            }}
          />

Solution

  • bg-primary is coming from Tailwind, right? If so, you should be able to follow the Tailwind CSS setup guide in the Material UI docs to start adding Tailwind classNames directly to the MUI X Date Picker.