Skip to content

Commit

Permalink
fix datepicker dropdown and taborder in create time entry
Browse files Browse the repository at this point in the history
  • Loading branch information
Onatcer committed Mar 5, 2025
1 parent b6bbcd7 commit 3026edd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 2 additions & 0 deletions resources/js/packages/ui/src/Input/DatePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { twMerge } from 'tailwind-merge';
const props = defineProps<{
class?: string;
tabindex?: string;
}>();
// This has to be a localized timestamp, not UTC
Expand Down Expand Up @@ -50,6 +51,7 @@ const emit = defineEmits(['changed']);
<input
id="start"
ref="datePicker"
:tabindex="tabindex"
:class="
twMerge(
'bg-input-background border text-white border-input-border focus-visible:outline-0 focus-visible:border-input-border-active focus-visible:ring-0 rounded-md',
Expand Down
16 changes: 10 additions & 6 deletions resources/js/packages/ui/src/TimeEntry/TimeEntryCreateModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import type {
Client,
CreateTimeEntryBody,
} from '@/packages/api/src';
import TimePicker from '@/packages/ui/src/Input/TimePicker.vue';
import { getOrganizationCurrencyString } from '@/utils/money';
import { canCreateProjects } from '@/utils/permissions';
import TagDropdown from '@/packages/ui/src/Tag/TagDropdown.vue';
Expand All @@ -30,6 +29,7 @@ import DurationHumanInput from '@/packages/ui/src/Input/DurationHumanInput.vue';
import { InformationCircleIcon } from '@heroicons/vue/20/solid';
import type { Tag, Task } from '@/packages/api/src';
import TimePickerSimple from "@/packages/ui/src/Input/TimePickerSimple.vue";
const show = defineModel('show', { default: false });
const saving = ref(false);
Expand Down Expand Up @@ -244,30 +244,34 @@ type BillableOption = {
<div class="">
<InputLabel>Start</InputLabel>
<div class="flex flex-col items-center space-y-2 mt-1">
<TimePicker
<TimePickerSimple

v-model="localStart"
size="large"></TimePicker>
size="large"></TimePickerSimple>
<DatePicker
v-model="localStart"
tabindex="1"
class="text-xs text-text-tertiary max-w-28 px-1.5 py-1.5"></DatePicker>
</div>
</div>
<div class="">
<InputLabel>End</InputLabel>
<div class="flex flex-col items-center space-y-2 mt-1">
<TimePicker
<TimePickerSimple
v-model="localEnd"
size="large"></TimePicker>
size="large"></TimePickerSimple>
<DatePicker
v-model="localEnd"
tabindex="1"
class="text-xs text-text-tertiary max-w-28 px-1.5 py-1.5"></DatePicker>
</div>
</div>
</div>
</template>
<template #footer>
<SecondaryButton @click="show = false"> Cancel</SecondaryButton>
<SecondaryButton tabindex="2" @click="show = false"> Cancel</SecondaryButton>
<PrimaryButton
tabindex="2"
class="ms-3"
:class="{ 'opacity-25': saving }"
:disabled="saving"
Expand Down

0 comments on commit 3026edd

Please sign in to comment.