Skip to content

Commit

Permalink
Fixing end dates
Browse files Browse the repository at this point in the history
  • Loading branch information
maayarosama committed Jan 31, 2024
1 parent fc0c30d commit 08c1c83
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion client/src/components/requests/eventRequest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ export default {
setup(props, ctx) {
const $api = useApi()
const startDate = ref<string>(props.dates.startStr)
const endDate = ref<string>(props.dates.endStr)
const endDate = ref<any>(new Date(props.dates.endStr))
endDate.value.setDate(endDate.value.getDate() - 1);
endDate.value = endDate.value.toISOString().split('T')[0];
const name = ref<string>("")
const description = ref<string>("")
const form = ref()
Expand Down
4 changes: 3 additions & 1 deletion client/src/components/requests/leaveRequest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ export default {
const $api = useApi()
const form = ref()
const startDate = ref<Date>(props.dates.startStr)
const endDate = ref<Date>(props.dates.endStr)
const endDate = ref<any>(new Date(props.dates.endStr))
endDate.value.setDate(endDate.value.getDate() - 1);
endDate.value = endDate.value.toISOString().split('T')[0];
const user = ApiClientBase.user
const leaveReason = ref<Api.LeaveReason>()
const actualDays = useAsyncState($api.vacations.calculate.list({
Expand Down

0 comments on commit 08c1c83

Please sign in to comment.