@@ -3,7 +3,6 @@ import './VDatePickerMonth.sass'
3
3
4
4
// Components
5
5
import { VBtn } from '@/components/VBtn'
6
- import { VDefaultsProvider } from '@/components/VDefaultsProvider'
7
6
8
7
// Composables
9
8
import { makeCalendarProps , useCalendar } from '@/composables/calendar'
@@ -12,7 +11,7 @@ import { MaybeTransition } from '@/composables/transition'
12
11
13
12
// Utilities
14
13
import { computed , ref , shallowRef , watch } from 'vue'
15
- import { genericComponent , omit , propsFactory } from '@/util'
14
+ import { genericComponent , omit , propsFactory , useRender } from '@/util'
16
15
17
16
// Types
18
17
import type { PropType } from 'vue'
@@ -152,7 +151,7 @@ export const VDatePickerMonth = genericComponent<VDatePickerMonthSlots>()({
152
151
}
153
152
}
154
153
155
- return ( ) => (
154
+ useRender ( ( ) => (
156
155
< div class = "v-date-picker-month" >
157
156
{ props . showWeek && (
158
157
< div key = "weeks" class = "v-date-picker-month__weeks" >
@@ -188,6 +187,13 @@ export const VDatePickerMonth = genericComponent<VDatePickerMonthSlots>()({
188
187
{ daysInMonth . value . map ( ( item , i ) => {
189
188
const slotProps = {
190
189
props : {
190
+ class : 'v-date-picker-month__day-btn' ,
191
+ color : item . isSelected || item . isToday ? props . color : undefined ,
192
+ disabled : item . isDisabled ,
193
+ icon : true ,
194
+ ripple : false ,
195
+ text : item . localized ,
196
+ variant : item . isSelected ? 'flat' : item . isToday ? 'outlined' : 'text' ,
191
197
onClick : ( ) => onClick ( item . date ) ,
192
198
} ,
193
199
item,
@@ -212,38 +218,16 @@ export const VDatePickerMonth = genericComponent<VDatePickerMonthSlots>()({
212
218
] }
213
219
data-v-date = { ! item . isDisabled ? item . isoDate : undefined }
214
220
>
215
-
216
221
{ ( props . showAdjacentMonths || ! item . isAdjacent ) && (
217
- < VDefaultsProvider
218
- defaults = { {
219
- VBtn : {
220
- class : 'v-date-picker-month__day-btn' ,
221
- color : ( item . isSelected || item . isToday ) && ! item . isDisabled
222
- ? props . color
223
- : undefined ,
224
- disabled : item . isDisabled ,
225
- icon : true ,
226
- ripple : false ,
227
- text : item . localized ,
228
- variant : item . isDisabled
229
- ? item . isToday ? 'outlined' : 'text'
230
- : item . isToday && ! item . isSelected ? 'outlined' : 'flat' ,
231
- onClick : ( ) => onClick ( item . date ) ,
232
- } ,
233
- } }
234
- >
235
- { slots . day ?.( slotProps ) ?? (
236
- < VBtn { ...slotProps . props } />
237
- ) }
238
- </ VDefaultsProvider >
222
+ slots . day ?.( slotProps ) ?? ( < VBtn { ...slotProps . props } /> )
239
223
) }
240
224
</ div >
241
225
)
242
226
} ) }
243
227
</ div >
244
228
</ MaybeTransition >
245
229
</ div >
246
- )
230
+ ) )
247
231
} ,
248
232
} )
249
233
0 commit comments