Skip to content

Commit

Permalink
fix(FormRender): rename displayDate
Browse files Browse the repository at this point in the history
  • Loading branch information
Barrior committed Jan 5, 2024
1 parent a6abcc5 commit e0332ed
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/form-render-react/src/locale/en_US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ export default {
placeholderInput: 'Please enter ${title}',
placeholderSelect: 'Please select ${title}',
comma: ',',
displayDate: '${start} to ${end}',
displayDateRange: '${start} to ${end}',
},
}
2 changes: 1 addition & 1 deletion packages/form-render-react/src/locale/zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ export default {
placeholderInput: '请输入${title}',
placeholderSelect: '请选择${title}',
comma: ',',
displayDate: '${start} 至 ${end}',
displayDateRange: '${start} 至 ${end}',
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const DateRangePicker: React.FC<IOpenComponentParams<[string, string]>> = ({
? 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),
})
Expand Down

0 comments on commit e0332ed

Please sign in to comment.