代码之家  ›  专栏  ›  技术社区  ›  OccamsRazor

MUI v5日期选择器:有没有办法移除SwitchViewButton?

  •  0
  • OccamsRazor  · 技术社区  · 3 年前

    有没有办法从日历选择器中删除SwitchViewButton(显示月份和年份的按钮),或者用我自己的组件替换它?

    他们的API提供了以下道具,可以在StaticDatePicker中对其进行修改: components = { LeftArrowButton?: elementType, LeftArrowIcon?: elementType, OpenPickerIcon?: elementType, RightArrowButton?: elementType, RightArrowIcon?: elementType, SwitchViewButton?: elementType, SwitchViewIcon?: elementType }

    但当我尝试向其中任何一个发送“null”时,它会完全忽略它们并呈现相同的内容。

    Date Picker view

    0 回复  |  直到 3 年前