Skip to content

Commit

Permalink
Fix a bug in the assignment date picker
Browse files Browse the repository at this point in the history
  • Loading branch information
Dlurak committed Sep 1, 2024
1 parent 3641bd9 commit 4e591f9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
<Icon src={Clock} class="h-4 w-4" micro />
<Store
store={i('assignments.assignment.date', {
start: stringify(assignment.from),
end: stringify(assignment.due)
start: stringify(assignment.from, { weekday: 'short' }),
end: stringify(assignment.due, { weekday: 'short' })
})}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
customDateToNormal(due) > customDateToNormal(from)
);
$: {
function setAutoDue() {
const dueInDays = safeDaysUntil({
subject,
timetable: $timetable,
Expand All @@ -98,6 +98,13 @@
due = normalToCustomDate(date);
}
$: {
$timetable;
from;
subject;
setAutoDue();
}
classInput.subscribe((cl) => {
const lowercased = mapObject($defaultSubjects, (key) => key.toLowerCase(), self);
const smart = $smartDetection ? smartSubject(cl) : undefined;
Expand Down

0 comments on commit 4e591f9

Please sign in to comment.