diff --git a/packages/ui/date-picker/src/DatePicker.tsx b/packages/ui/date-picker/src/DatePicker.tsx index a6a1d125b..c45d07249 100644 --- a/packages/ui/date-picker/src/DatePicker.tsx +++ b/packages/ui/date-picker/src/DatePicker.tsx @@ -86,8 +86,7 @@ export const DatePicker = forwardRef( }, ref ) => { - const i18n = useLocaleConte - xt() + const i18n = useLocaleContext() const locale = i18n.locale const [dateRangeTimePanelNow, setDateRangeTimePanelNow] = useState(0) diff --git a/packages/ui/date-picker/src/types.ts b/packages/ui/date-picker/src/types.ts index 2237ecb15..51bf230d3 100644 --- a/packages/ui/date-picker/src/types.ts +++ b/packages/ui/date-picker/src/types.ts @@ -291,6 +291,7 @@ export interface DatePickerProps extends Omit, 'placehold * 自定义触发器 */ customRender?: React.ReactNode | ((option: (Date | undefined)[]) => React.ReactNode) + /** * 选择框前置内容 */ prefix?: React.ReactNode