mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-12 02:02:15 +01:00
Use locale-aware parseTimeInput for duration inputs
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user