DateTimePicker: clear time and emit done on unset
Users couldn't clear the time part of a task's due date because the "clear time" button only toggled includeTime=false without signalling the picker to finish. Call done() when clearing the time so the picker closes/emits the updated value, ensuring the task's has_time state is updated and the UI reflects a date-only value.
This commit is contained in:
parent
6ccc167239
commit
908ac41a6c
|
|
@ -162,7 +162,7 @@
|
||||||
{/each}
|
{/each}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<button onclick={() => (includeTime = false)} class="ml-auto opacity-40 hover:opacity-80">
|
<button onclick={() => { includeTime = false; done(); }} class="ml-auto opacity-40 hover:opacity-80">
|
||||||
<svg class="h-4 w-4" viewBox="0 0 20 20" fill="currentColor">
|
<svg class="h-4 w-4" viewBox="0 0 20 20" fill="currentColor">
|
||||||
<path d="M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z" />
|
<path d="M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z" />
|
||||||
</svg>
|
</svg>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue