web: debugging
Local Docker Build (Dev) / build-dev (push) Successful in 5s

This commit is contained in:
2025-10-26 11:45:46 -04:00
parent eb66af837f
commit 4516a80208
3 changed files with 15 additions and 9 deletions
+11 -6
View File
@@ -1047,18 +1047,23 @@ async function handleEnhancedEditSubmit(event) {
const dateadded = document.getElementById('edit-dateadded').value;
const source = document.getElementById('edit-source').value;
if (!dateadded) {
if (!dateadded && source !== 'airdate') {
showToast('Please enter a date', 'warning');
return;
}
// Convert datetime-local to ISO string with error handling
let isoDateadded = null;
try {
isoDateadded = new Date(dateadded).toISOString();
} catch (e) {
showToast('Invalid date format', 'error');
return;
if (dateadded) {
try {
isoDateadded = new Date(dateadded).toISOString();
} catch (e) {
showToast('Invalid date format', 'error');
return;
}
} else if (source === 'airdate') {
// For airdate source, let the backend handle the date conversion
isoDateadded = null;
}
try {