Use locale-aware parseTimeInput for duration inputs

This commit is contained in:
Gregor Vostrak
2026-03-11 15:36:00 +01:00
parent a1d5563fc4
commit 97df779d1e
6 changed files with 567 additions and 50 deletions

View File

@@ -27,9 +27,11 @@ const temporaryCustomTimerEntry = ref<string>('');
const open = ref(false);
function updateTimerAndStartLiveTimerUpdate() {
const defaultUnit =
organizationSettings?.value?.intervalFormat === 'decimal' ? 'hours' : 'minutes';
const seconds = parseTimeInput(temporaryCustomTimerEntry.value, defaultUnit);
const seconds = parseTimeInput(
temporaryCustomTimerEntry.value,
organizationSettings.value.numberFormat,
organizationSettings.value.intervalFormat === 'decimal' ? 'hours' : 'minutes'
);
if (seconds && seconds > 0) {
let newEndDate = props.end;
let newStartDate = props.start;