Merge branch 'main' into next

This commit is contained in:
nocobase[bot] 2025-01-08 06:47:29 +00:00
commit fe7a5547a7
2 changed files with 2 additions and 2 deletions

View File

@ -205,7 +205,7 @@ DatePicker.RangePicker = function RangePicker(props: any) {
...props,
format: getDateTimeFormat(targetPicker, targetDateFormat, showTime, timeFormat),
picker: targetPicker,
showTime: showTime ? { defaultValue: [dayjs('00:00:00', 'HH:mm:ss'), dayjs('00:00:00', 'HH:mm:ss')] } : false,
showTime: showTime ? { defaultValue: [dayjs('00:00:00', 'HH:mm:ss'), dayjs('23:59:59', 'HH:mm:ss')] } : false,
};
const [stateProps, setStateProps] = useState(newProps);
if (isFilterAction) {

View File

@ -229,7 +229,7 @@ export const getPickerFormat = (picker) => {
export const getDateTimeFormat = (picker, format, showTime, timeFormat) => {
if (picker === 'date') {
if (showTime) {
return format + timeFormat || 'HH:mm:ss';
return `${format} ${timeFormat || 'HH:mm:ss'}`;
}
return format;
}