Skip to content

Commit 65b2cdc

Browse files
shreeyash07frozenhelium
authored andcommitted
feat(go-ui): update type props in DateInput to implement month input variant
1 parent abde056 commit 65b2cdc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • packages/ui/src/components/DateInput

packages/ui/src/components/DateInput/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export interface Props<NAME> extends InheritedProps<NAME> {
1414
inputClassName?: string;
1515
withDiffView?: boolean;
1616
prevValue?: RawInputProps<NAME>['value'];
17+
type?: 'date' | 'month';
1718
}
1819

1920
function DateInput<const T>(props: Props<T>) {
@@ -25,6 +26,7 @@ function DateInput<const T>(props: Props<T>) {
2526
withDiffView,
2627
value,
2728
prevValue,
29+
type = 'date',
2830
...otherProps
2931
} = props;
3032

@@ -59,7 +61,7 @@ function DateInput<const T>(props: Props<T>) {
5961
readOnly={readOnly}
6062
disabled={disabled}
6163
className={inputClassName}
62-
type="date"
64+
type={type}
6365
/>
6466
)}
6567
/>

0 commit comments

Comments
 (0)