|
|
@@ -10,6 +10,7 @@ import { useToast } from '../../contexts/ToastContext';
|
|
|
import { useFilamentMapping } from '../../hooks/useFilamentMapping';
|
|
|
import { useMultiPrinterFilamentMapping, type PerPrinterConfig } from '../../hooks/useMultiPrinterFilamentMapping';
|
|
|
import { isPlaceholderDate } from '../../utils/amsHelpers';
|
|
|
+import { toDateTimeLocalValue } from '../../utils/date';
|
|
|
import { PrinterSelector } from './PrinterSelector';
|
|
|
import { PlateSelector } from './PlateSelector';
|
|
|
import { FilamentMapping } from './FilamentMapping';
|
|
|
@@ -90,7 +91,8 @@ export function PrintModal({
|
|
|
let scheduledTime = '';
|
|
|
if (queueItem.scheduled_time && !isPlaceholderDate(queueItem.scheduled_time)) {
|
|
|
const date = new Date(queueItem.scheduled_time);
|
|
|
- scheduledTime = date.toISOString().slice(0, 16);
|
|
|
+ // Use toDateTimeLocalValue to convert UTC to local time for datetime-local input
|
|
|
+ scheduledTime = toDateTimeLocalValue(date);
|
|
|
}
|
|
|
|
|
|
return {
|