diff --git a/packages/form-render-react/src/locale/en_US.ts b/packages/form-render-react/src/locale/en_US.ts index 11ca24f..f5fd001 100644 --- a/packages/form-render-react/src/locale/en_US.ts +++ b/packages/form-render-react/src/locale/en_US.ts @@ -8,6 +8,6 @@ export default { placeholderInput: 'Please enter ${title}', placeholderSelect: 'Please select ${title}', comma: ',', - displayDate: '${start} to ${end}', + displayDateRange: '${start} to ${end}', }, } diff --git a/packages/form-render-react/src/locale/zh_CN.ts b/packages/form-render-react/src/locale/zh_CN.ts index 7a499a4..c9b7a54 100644 --- a/packages/form-render-react/src/locale/zh_CN.ts +++ b/packages/form-render-react/src/locale/zh_CN.ts @@ -8,6 +8,6 @@ export default { placeholderInput: '请输入${title}', placeholderSelect: '请选择${title}', comma: ',', - displayDate: '${start} 至 ${end}', + displayDateRange: '${start} 至 ${end}', }, } diff --git a/packages/form-render-react/src/renderers/DateRangePicker.tsx b/packages/form-render-react/src/renderers/DateRangePicker.tsx index cea4c18..ae71505 100644 --- a/packages/form-render-react/src/renderers/DateRangePicker.tsx +++ b/packages/form-render-react/src/renderers/DateRangePicker.tsx @@ -30,7 +30,7 @@ const DateRangePicker: React.FC> = ({ ? DEFAULT_DATE_TIME_FORMAT : DEFAULT_DATE_FORMAT const format = schema.renderOptions?.format || defaultFormat - displayText = utils.templateCompiled(locale.FormRender.displayDate, { + displayText = utils.templateCompiled(locale.FormRender.displayDateRange, { start: dayjs(value?.[0]).format(format), end: dayjs(value?.[1]).format(format), })