mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-09 15:39:24 +08:00
refactor(client): set default end time for time range in filter block to 23:59:59" (#6012)
* fix: datetime format * fix: bug
This commit is contained in:
parent
a17b0ca63b
commit
35238cc02e
@ -101,7 +101,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) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user