Skip to content

Commit

Permalink
Use out Input component as DatePicker's Input
Browse files Browse the repository at this point in the history
  • Loading branch information
nighto committed Dec 6, 2024
1 parent e5e749e commit 6ddde14
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/forms/controls/DatePicker/DatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import { classNames as cx, type ComponentPropsWithoutRef, type ClassNameArgument
import 'react-datepicker/dist/react-datepicker.css';
import cl from './DatePicker.module.scss';

import { Input } from '../Input/Input.tsx';


// Omit<ComponentPropsWithoutRef<typeof ReactDatePicker>, 'onChange'> & {
export type DatePickerProps = typeof ReactDatePicker & {
Expand Down Expand Up @@ -40,6 +42,7 @@ export const DatePicker = (props: DatePickerProps) => {
)}
dateFormat="MM/dd/yyyy"
placeholderText="MM/DD/YYYY"
customInput={<Input />}
{...propsRest}
/>
</div>
Expand Down

0 comments on commit 6ddde14

Please sign in to comment.