()
| 1524 | } |
| 1525 | |
| 1526 | function selectedDateFetchDays() { |
| 1527 | const today = dateFromInputValue(todayDateValue()); |
| 1528 | const selected = dateFromInputValue($("paperDate")?.value || ""); |
| 1529 | if (!today || !selected) return Number($("daysInput")?.value || 1); |
| 1530 | if (selected > today) return 1; |
| 1531 | const diffDays = Math.floor((today - selected) / 86400000) + 1; |
| 1532 | return Math.min(14, Math.max(1, diffDays)); |
| 1533 | } |
| 1534 | |
| 1535 | function syncDateControls() { |
| 1536 | const dateInput = $("paperDate"); |
no test coverage detected