Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export interface DatePickerProps<TValue extends Value> extends CalendarProps<TVa
inputPlaceholder?: string;
formatInputText?: () => string;
renderInput?: React.FC<RenderInputProps>;
inputProps?: any
}

type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
Expand Down
2 changes: 2 additions & 0 deletions src/DatePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const DatePicker = ({
inputPlaceholder,
inputClassName,
inputName,
inputProps,
renderInput,
wrapperClassName,
calendarClassName,
Expand Down Expand Up @@ -151,6 +152,7 @@ const DatePicker = ({
renderInput={renderInput}
inputName={inputName}
locale={locale}
inputProps={inputProps}
/>
{isCalendarOpen && (
<>
Expand Down
12 changes: 11 additions & 1 deletion src/DatePickerInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,16 @@ import { TYPE_SINGLE_DATE, TYPE_RANGE, TYPE_MUTLI_DATE } from './shared/constant

const DatePickerInput = React.forwardRef(
(
{ value, inputPlaceholder, inputClassName, inputName, formatInputText, renderInput, locale },
{
value,
inputPlaceholder,
inputClassName,
inputName,
formatInputText,
renderInput,
locale,
inputProps,
},
ref,
) => {
const { getLanguageDigits } = useLocaleUtils(locale);
Expand Down Expand Up @@ -73,6 +82,7 @@ const DatePickerInput = React.forwardRef(
placeholder={placeholderValue}
className={`DatePicker__input -${isRtl ? 'rtl' : 'ltr'} ${inputClassName}`}
aria-label={placeholderValue}
{...inputProps}
/>
)
);
Expand Down