aboveyunhai / chakra-dayzed-datepicker

Chakra UI + Dayzed = datepicker
https://aboveyunhai.github.io/chakra-dayzed-datepicker/
MIT License
225 stars 47 forks source link

how to change the range picker color #86

Open shanoysinc opened 2 weeks ago

shanoysinc commented 2 weeks ago

image

shanoysinc commented 2 weeks ago

its purple and i dont see away to change its color

shanoysinc commented 2 weeks ago

@aboveyunhai any idea ?

aboveyunhai commented 2 weeks ago

its purple and i dont see away to change its color

you should go through the readme, there is an example where you can change the style based on the state, it's just CSS, color might be what you need

 propsConfigs={{
    dateNavBtnProps: {}
    dayOfMonthBtnProps: {
      defaultBtnProps: {
        borderColor: "red.300",
        _hover: {
          background: 'blue.400',
        }
      },
      isInRangeBtnProps: {
        color: "yellow",
      },
      selectedBtnProps: {
        background: "blue.200",
        color: "green",
      },
      todayBtnProps: {
        background: "teal.400",
      }
    },
 }}
shanoysinc commented 2 weeks ago

its purple and i dont see away to change its color

you should go through the readme, there is an example where you can change the style based on the state, it's just CSS, color might be what you need

 propsConfigs={{
    dateNavBtnProps: {}
    dayOfMonthBtnProps: {
      defaultBtnProps: {
        borderColor: "red.300",
        _hover: {
          background: 'blue.400',
        }
      },
      isInRangeBtnProps: {
        color: "yellow",
      },
      selectedBtnProps: {
        background: "blue.200",
        color: "green",
      },
      todayBtnProps: {
        background: "teal.400",
      }
    },
 }}

I cant get any of them to change the hover purple color even when you select them I can't change the purple color there as well. https://github.com/user-attachments/assets/df78e375-023d-4ae9-b8f1-895ddf08c9a6

aboveyunhai commented 2 weeks ago

@shanoysinc something like

       isInRangeBtnProps: {
          background: 'blue.300',
       },

I highly suggest just skim though the source code as it's really simple. so you don't need to guess the default property and what to overwrite.

shanoysinc commented 2 weeks ago

@shanoysinc something like

       isInRangeBtnProps: {
          background: 'blue.300',
       },

I highly suggest just skim though the source code as it's really simple. so you don't need to guess the default property and what to overwrite.

Thanks @aboveyunhai I could have sworn I tried that and it didn't work