Skip to content

Commit 59984cb

Browse files
authored
#503 - fix calendar (#505)
1 parent 9eed64a commit 59984cb

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

app/Http/Controllers/OvertimeTimesheetController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function __invoke(?string $month = null): BinaryFileResponse
1818
$this->authorize("manageRequestsAsAdministrativeApprover");
1919

2020
$month = Carbon::canBeCreatedFromFormat($month, "m-Y")
21-
? Carbon::createFromFormat("m-Y", $month)
21+
? Carbon::createFromFormat("d-m-Y", "01-$month")
2222
: Carbon::now();
2323

2424
$users = User::query()

app/Http/Controllers/TimesheetController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function __invoke(VacationTypeConfigRetriever $configRetriever, ?string $
2020
$this->authorize("manageRequestsAsAdministrativeApprover");
2121

2222
$month = Carbon::canBeCreatedFromFormat($month, "m-Y")
23-
? Carbon::createFromFormat("m-Y", $month)
23+
? Carbon::createFromFormat("d-m-Y", "01-$month")
2424
: Carbon::now();
2525

2626
$users = User::query()

app/Http/Controllers/VacationCalendarController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function index(
2222
?string $month = null,
2323
): Response|RedirectResponse {
2424
$month = Carbon::canBeCreatedFromFormat($month, "m-Y")
25-
? Carbon::createFromFormat("m-Y", $month)
25+
? Carbon::createFromFormat("d-m-Y", "01-$month")
2626
: Carbon::now();
2727

2828
/** @var User $currentUser */

0 commit comments

Comments
 (0)