|
3 | 3 | import { format } from 'date-fns'; |
4 | 4 | import Prism from 'svelte-prismjs'; |
5 | 5 |
|
6 | | - export let isMultipane = false; |
7 | | - export let showPresets = false; |
| 6 | + export let isMultipane = true; |
| 7 | + export let showPresets = true; |
8 | 8 |
|
9 | 9 | export let days = 29; |
10 | 10 |
|
|
95 | 95 | </script> |
96 | 96 |
|
97 | 97 | <div class="date-filter"> |
98 | | - <DatePicker bind:isOpen bind:startDate isRange${isMultipane ? ' isMultipane' : ''}${showPresets ? ' showPresets' : ''}> |
| 98 | + <DatePicker theme="custom-datepicker" bind:isOpen bind:startDate isRange${isMultipane ? ' isMultipane' : ''}${showPresets ? ' showPresets' : ''}> |
99 | 99 | <div class="date-field" on:click={toggleDatePicker} class:open={isOpen}> |
100 | 100 | <i class="icon-calendar" /> |
101 | 101 | <div class="date"> |
|
135 | 135 | height: 14px; |
136 | 136 | width: 14px; |
137 | 137 | } |
| 138 | +
|
| 139 | + :global(.datepicker[data-picker-theme="custom-datepicker"]) { |
| 140 | + --datepicker-container-background: #ff66ae; |
| 141 | + --datepicker-container-border: 1px solid #ff1683; |
| 142 | +
|
| 143 | + --datepicker-calendar-header-text-color: #fff; |
| 144 | + --datepicker-calendar-dow-color: #fff; |
| 145 | + --datepicker-calendar-day-color: #fff; |
| 146 | + --datepicker-calendar-day-color-disabled: pink; |
| 147 | + --datepicker-calendar-range-selected-background: #ff1683; |
| 148 | +
|
| 149 | + --datepicker-calendar-header-month-nav-background-hover: #ff1683; |
| 150 | + --datepicker-calendar-header-month-nav-icon-next-filter: invert(100); |
| 151 | + --datepicker-calendar-header-month-nav-icon-prev-filter: invert(100); |
| 152 | + --datepicker-calendar-header-year-nav-icon-next-filter: invert(100); |
| 153 | + --datepicker-calendar-header-year-nav-icon-prev-filter: invert(100); |
| 154 | +
|
| 155 | + --datepicker-calendar-split-border: 1px solid pink; |
| 156 | +
|
| 157 | + --datepicker-presets-border: 1px solid pink; |
| 158 | + --datepicker-presets-button-background-active: #ff1683; |
| 159 | + --datepicker-presets-button-color: #fff; |
| 160 | + --datepicker-presets-button-color-active: #fff; |
| 161 | + --datepicker-presets-button-color-hover: #333; |
| 162 | + --datepicker-presets-button-color-focus: #333; |
| 163 | + } |
138 | 164 | </style> |
139 | 165 | `} /> |
140 | 166 |
|
|
161 | 187 | } |
162 | 188 |
|
163 | 189 | :global(.datepicker[data-picker-theme="custom-datepicker"]) { |
164 | | - --datepicker-state-active: pink; |
165 | | - --datepicker-container-background: #FF66AE; |
| 190 | + --datepicker-container-background: #ff66ae; |
| 191 | + --datepicker-container-border: 1px solid #ff1683; |
| 192 | +
|
166 | 193 | --datepicker-calendar-header-text-color: #fff; |
167 | 194 | --datepicker-calendar-dow-color: #fff; |
168 | 195 | --datepicker-calendar-day-color: #fff; |
169 | 196 | --datepicker-calendar-day-color-disabled: pink; |
170 | 197 | --datepicker-calendar-range-selected-background: #ff1683; |
| 198 | +
|
| 199 | + --datepicker-calendar-header-month-nav-background-hover: #ff1683; |
171 | 200 | --datepicker-calendar-header-month-nav-icon-next-filter: invert(100); |
172 | 201 | --datepicker-calendar-header-month-nav-icon-prev-filter: invert(100); |
173 | 202 | --datepicker-calendar-header-year-nav-icon-next-filter: invert(100); |
174 | 203 | --datepicker-calendar-header-year-nav-icon-prev-filter: invert(100); |
| 204 | +
|
| 205 | + --datepicker-calendar-split-border: 1px solid pink; |
| 206 | +
|
| 207 | + --datepicker-presets-border: 1px solid pink; |
| 208 | + --datepicker-presets-button-background-active: #ff1683; |
| 209 | + --datepicker-presets-button-color: #fff; |
| 210 | + --datepicker-presets-button-color-active: #fff; |
| 211 | + --datepicker-presets-button-color-hover: #333; |
| 212 | + --datepicker-presets-button-color-focus: #333 |
175 | 213 | } |
176 | 214 | </style> |
0 commit comments