Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pickers][DatePicker] change borderRadius of selected day for dateCalendar #13083

Closed
ImamJanjua opened this issue May 11, 2024 · 10 comments
Closed
Labels
component: date picker This is the name of the generic UI component, not the React module! component: pickers This is the name of the generic UI component, not the React module! status: waiting for author Issue with insufficient information

Comments

@ImamJanjua
Copy link

ImamJanjua commented May 11, 2024

Steps to reproduce

No response

Current behavior

No response

Expected behavior

No response

Context

Hi, I am trying to change the borderRadius for the days which are been selected or like the todays day, but not working for me

<DateCalendar
  {...props}
  slots={{
    leftArrowIcon: LeftArrowIcon,
    rightArrowIcon: RightArrowIcon,
  }}
  slotProps={{
    day: {
      sx: {
        "::selection": {
          borderRadius: "10px",
        },
      },
    },
  }}
/>

Your environment

No response

Search keywords: .

@ImamJanjua ImamJanjua added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label May 11, 2024
@LukasTy
Copy link
Member

LukasTy commented May 13, 2024

@ImamJanjua is this something that you are looking for? 🤔
Consider checking the customization playground for more examples. 😉

@LukasTy LukasTy added status: waiting for author Issue with insufficient information component: pickers This is the name of the generic UI component, not the React module! and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels May 13, 2024
@LukasTy LukasTy changed the title change borderRadius of selected day for dateCalendar [pickers] change borderRadius of selected day for dateCalendar May 13, 2024
@ImamJanjua
Copy link
Author

@LukasTy thanks man!

another thing, calendar is not responsive at all and appears to have fixed dimension, does it have something to do with the breakpoints?

Bildschirmaufnahme.2024-05-13.um.10.17.26.mov

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels May 13, 2024
@LukasTy
Copy link
Member

LukasTy commented May 13, 2024

another thing, calendar is not responsive at all and appears to have fixed dimension, does it have something to do with the breakpoints?

Yes, the calendar has a fixed width just as the material design suggests.
Do you have suggestions on how to make it responsive? 🤔

@LukasTy LukasTy added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels May 13, 2024
@ImamJanjua
Copy link
Author

@LukasTy shouldn't u know that? 😄

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels May 13, 2024
@LukasTy
Copy link
Member

LukasTy commented May 13, 2024

shouldn't u know that? 😄

Well, that's basically an answer—we don't know of a good way to make the calendar UX friendly and responsive, that's why it has the same fixed width as the material design suggests.
It's enough to fit in the portrait orientation of all the modern smallest mobile devices, so, it seems to do the trick. 🤔

@ImamJanjua
Copy link
Author

@LukasTy does the calendar has breakpoints and can i acess and modify them?

@LukasTy
Copy link
Member

LukasTy commented May 13, 2024

does the calendar has breakpoints and can i acess and modify them?

No, there are no explicit breakpoints that are used.
If you want to use the theme breakpoints, then access them and override the styles accordingly. 👍

@LukasTy LukasTy added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels May 13, 2024
@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels May 13, 2024
@ImamJanjua
Copy link
Author

@LukasTy thanks!

do u may know how can change the view with custom header?

const DateCalendar: React.FC<DateCalendarProps<Date>> = (props) => {

  const Header = () => {
    return (
      <div className="flex flex-row justify-center gap-8 ">
         {/* on press go to next month*/}
        <button>
          <ChevronLeft size={22} />
        </button>
          
          {/* on press go to today*/}
        <button>today</button>

        {/* on press go to previous month*/}
        <button>
          <ChevronRight size={22} />
        </button>
      </div>
    );
  };

  return (
    <ThemeProvider theme={theme}>
      <Calendar
        slots={{
          calendarHeader: Header,
        }}                   />
   
  );
};

@michelengelen michelengelen changed the title [pickers] change borderRadius of selected day for dateCalendar [pickers][DayCalendar] change borderRadius of selected day for dateCalendar May 14, 2024
@michelengelen michelengelen changed the title [pickers][DayCalendar] change borderRadius of selected day for dateCalendar [pickers][DateCalendar] change borderRadius of selected day for dateCalendar May 14, 2024
@michelengelen michelengelen added the component: date picker This is the name of the generic UI component, not the React module! label May 14, 2024
@michelengelen michelengelen changed the title [pickers][DateCalendar] change borderRadius of selected day for dateCalendar [pickers][DatePicker] change borderRadius of selected day for dateCalendar May 14, 2024
@michelengelen
Copy link
Member

@LukasTy thanks!

do u may know how can change the view with custom header?

const DateCalendar: React.FC<DateCalendarProps<Date>> = (props) => {

  const Header = () => {
    return (
      <div className="flex flex-row justify-center gap-8 ">
         {/* on press go to next month*/}
        <button>
          <ChevronLeft size={22} />
        </button>
          
          {/* on press go to today*/}
        <button>today</button>

        {/* on press go to previous month*/}
        <button>
          <ChevronRight size={22} />
        </button>
      </div>
    );
  };

  return (
    <ThemeProvider theme={theme}>
      <Calendar
        slots={{
          calendarHeader: Header,
        }}                   />
   
  );
};

see this #13116 ... is this issue resolved and can be closed @ImamJanjua?

@michelengelen michelengelen added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels May 14, 2024
Copy link

The issue has been inactive for 7 days and has been automatically closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: date picker This is the name of the generic UI component, not the React module! component: pickers This is the name of the generic UI component, not the React module! status: waiting for author Issue with insufficient information
Projects
None yet
Development

No branches or pull requests

3 participants