1
1
import { computed , inject , nextTick , provide , Ref , shallowRef , toValue , watch } from 'vue' ;
2
2
import { CalendarContext , CalendarViewType } from './types' ;
3
3
import { hasKeyCode , normalizeProps , useCaptureProps , useUniqId } from '../utils/common' ;
4
- import { ControlProps , Maybe , Reactivify } from '../types' ;
4
+ import { BuiltInControlTypes , ControlProps , Maybe , Reactivify } from '../types' ;
5
5
import { useLocale } from '../i18n' ;
6
6
import { FieldTypePrefixes } from '../constants' ;
7
7
import { blockEvent } from '../utils/events' ;
@@ -17,7 +17,6 @@ import { createDisabledContext } from '../helpers/createDisabledContext';
17
17
import { useVModelProxy } from '../reactivity/useVModelProxy' ;
18
18
import { useConstraintsValidator , useInputValidity } from '../validation' ;
19
19
import { useFieldControllerContext } from '../useFormField/useFieldController' ;
20
- import { registerField } from '@formwerk/devtools' ;
21
20
22
21
export interface CalendarControlProps extends ControlProps < Date | undefined > {
23
22
/**
@@ -128,6 +127,7 @@ export function useCalendarControl(_props: Reactivify<CalendarControlProps, 'fie
128
127
controller ?. registerControl ( {
129
128
getControlId : ( ) => calendarId ,
130
129
getControlElement : ( ) => calendarEl . value ,
130
+ getControlType : ( ) => BuiltInControlTypes . Calendar ,
131
131
} ) ;
132
132
}
133
133
@@ -338,13 +338,6 @@ export function useCalendarControl(_props: Reactivify<CalendarControlProps, 'fie
338
338
} ;
339
339
} , gridEl ) ;
340
340
341
- if ( __DEV__ ) {
342
- // If it is its own field, we should register it with devtools.
343
- if ( ! props . field ) {
344
- registerField ( field , 'Calendar' ) ;
345
- }
346
- }
347
-
348
341
return {
349
342
/**
350
343
* The id of the calendar element.
0 commit comments