v-calendar datepicker 高亮属性不改变颜色

v-calendar datepicker highlight attributes not changing colour

我在我的网站上使用 v-calendar datepicker,它运行良好,但我正在尝试使用 highlight attribute 重新设计圆圈的颜色,但似乎没有任何效果:

new Vue({
  el: "#app",
  data() {
    return {
      attrs: [{
        highlight: {
          color: '#123123',
        },
        /*
        also tried:

        highlight: {
          start: { color: '#123123' },
          base: { color: '#123123' },
          end: { color: '#123123' },
        },
        
        also tried using a preset colour like 
        
        color: 'purple' 
        
        but that also does nothing
        */
      }],
      range: {
        start: null,
        end: null
      }
    };
  },
});
@import url 'https://unpkg.com/v-calendar@2.3.4/lib/v-calendar.min.css';
.filter__date-range-holder {
  display: flex;
  justify-content: space-between;
  width: 95%;
}

.filter__date-range-column {
  width: calc(50% - 15px);
}

.form__row {
  position: relative;
  margin: 1.5em 0;
  background: white;
}

.form__control {
  width: 100%;
  border: 1px solid grey;
  font-size: 1rem;
  line-height: 1.5rem;
  color: black;
  padding: 0.75em;
  background: transparent;
}

.invalid .form__control {
  border-color: red;
  outline-color: red;
}

.form__control:focus {
  border-radius: 0;
}
<script src="https://unpkg.com/vue@2.6.14/dist/vue.js"></script>
<script src="https://unpkg.com/v-calendar@2.3.4/lib/v-calendar.umd.min.js"></script>
<div id='app'>
  <v-date-picker v-model="range" :popover="{ visibility: 'focus' }" :attributes="attrs" is-range>
    <template #default="{ inputValue, inputEvents }">
          <div class="filter__date-range-holder">
            <div class="filter__date-range-column">
              <div class="form__row filter__date-range-row">
                <label class="form__label filter__date-range-label" for="filter-date-from">From</label>
                <input id="filter-date-from" ref="filterDateForm" type="text" name="from" class="form__control form__control--textbox" :value="inputValue.start" v-on="inputEvents.start">
              </div>
            </div>
            <div class="filter__date-range-column">
              <div class="form__row filter__date-range-row">
                <label class="form__label filter__date-range-label" for="filter-date-to">To</label>
                <input id="filter-date-to" ref="filterDateTo" type="text" name="to" class="form__control form__control--textbox" :value="inputValue.end" v-on="inputEvents.start">
              </div>
            </div>
          </div>
        </template>
  </v-date-picker>
</div>

无论我做什么,它总是保持默认的蓝色。有谁知道我做错了什么或如何更改圆圈的颜色使其不是默认的蓝色(最好是十六进制颜色而不是其中一种预设)?

你可以用 css 来完成:

.vc-highlight {
  border-color: #123123 !important;
  background-color: #123123 !important;
}

new Vue({
  el: "#app",
  data() {
    return {
      attrs: [{
        highlight: {
          color: '#123123',
        },
        /*
        also tried:

        highlight: {
          start: { color: '#123123' },
          base: { color: '#123123' },
          end: { color: '#123123' },
        },
        
        also tried using a preset colour like 
        
        color: 'purple' 
        
        but that also does nothing
        */
      }],
      range: {
        start: null,
        end: null
      }
    };
  },
});
@import url 'https://unpkg.com/v-calendar@2.3.4/lib/v-calendar.min.css';
.filter__date-range-holder {
  display: flex;
  justify-content: space-between;
  width: 95%;
}

.filter__date-range-column {
  width: calc(50% - 15px);
}

.form__row {
  position: relative;
  margin: 1.5em 0;
  background: white;
}

.form__control {
  width: 100%;
  border: 1px solid grey;
  font-size: 1rem;
  line-height: 1.5rem;
  color: black;
  padding: 0.75em;
  background: transparent;
}

.invalid .form__control {
  border-color: red;
  outline-color: red;
}

.form__control:focus {
  border-radius: 0;
}

.vc-highlight {
  border-color: #123123 !important;
  background-color: #123123 !important;
}
<script src="https://unpkg.com/vue@2.6.14/dist/vue.js"></script>
<script src="https://unpkg.com/v-calendar@2.3.4/lib/v-calendar.umd.min.js"></script>
<div id='app'>
  <v-date-picker v-model="range" :popover="{ visibility: 'focus' }" :attributes="attrs" is-range>
    <template #default="{ inputValue, inputEvents }">
          <div class="filter__date-range-holder">
            <div class="filter__date-range-column">
              <div class="form__row filter__date-range-row">
                <label class="form__label filter__date-range-label" for="filter-date-from">From</label>
                <input id="filter-date-from" ref="filterDateForm" type="text" name="from" class="form__control form__control--textbox" :value="inputValue.start" v-on="inputEvents.start">
              </div>
            </div>
            <div class="filter__date-range-column">
              <div class="form__row filter__date-range-row">
                <label class="form__label filter__date-range-label" for="filter-date-to">To</label>
                <input id="filter-date-to" ref="filterDateTo" type="text" name="to" class="form__control form__control--textbox" :value="inputValue.end" v-on="inputEvents.start">
              </div>
            </div>
          </div>
        </template>
  </v-date-picker>
</div>