update
This commit is contained in:
@@ -2056,12 +2056,13 @@ export default function Kalender() {
|
||||
<Tooltip title="Als PDF exportieren">
|
||||
<IconButton
|
||||
size="small"
|
||||
onClick={() => generatePdf(
|
||||
viewMonth.year,
|
||||
viewMonth.month,
|
||||
trainingForMonth,
|
||||
eventsForMonth,
|
||||
)}
|
||||
onClick={() => {
|
||||
const start = new Date(viewMonth.year, viewMonth.month, 1);
|
||||
const end = new Date(viewMonth.year, viewMonth.month + 1, 0, 23, 59, 59);
|
||||
const trainToExport = trainingEvents.filter((t) => { const d = new Date(t.datum_von); return d >= start && d <= end; });
|
||||
const eventsToExport = veranstaltungen.filter((e) => { const d = new Date(e.datum_von); return d >= start && d <= end; });
|
||||
generatePdf(viewMonth.year, viewMonth.month, trainToExport, eventsToExport);
|
||||
}}
|
||||
>
|
||||
<PdfIcon fontSize="small" />
|
||||
</IconButton>
|
||||
|
||||
Reference in New Issue
Block a user