Add time selector to the CSV export (#2764)

This commit is contained in:
Igor Stuev
2025-06-04 16:18:29 +02:00
committed by GitHub
parent 1579518318
commit e251b437ec
5 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -32,8 +32,8 @@ const CsvExportForm = ({ hash, resource, filterType, filterValue, fileNameTempla
const formApi = useForm<FormFields>({
mode: 'onBlur',
defaultValues: {
from: dayjs().subtract(1, 'day').format('YYYY-MM-DD'),
to: dayjs().format('YYYY-MM-DD'),
from: dayjs().subtract(1, 'day').format('YYYY-MM-DDTHH:mm'),
to: dayjs().format('YYYY-MM-DDTHH:mm'),
},
});
const { handleSubmit, formState } = formApi;
@@ -49,8 +49,8 @@ const CsvExportForm = ({ hash, resource, filterType, filterValue, fileNameTempla
const url = buildUrl(resource, { hash } as never, {
address_id: hash,
from_period: exportType !== 'holders' ? data.from : null,
to_period: exportType !== 'holders' ? data.to : null,
from_period: exportType !== 'holders' ? dayjs(data.from).toISOString() : null,
to_period: exportType !== 'holders' ? dayjs(data.to).toISOString() : null,
filter_type: filterType,
filter_value: filterValue,
recaptcha_response: token,
+1 -1
View File
@@ -38,7 +38,7 @@ const CsvExportFormField = ({ formApi, name }: Props) => {
return (
<FormFieldText<FormFields, typeof name>
name={ name }
inputProps={{ type: 'date', max: dayjs().format('YYYY-MM-DD') }}
inputProps={{ type: 'datetime-local', max: dayjs().format('YYYY-MM-DDTHH:mm') }}
placeholder={ capitalize(name) }
required
rules={{ validate }}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 34 KiB