Skip to content

fix: allow clearing date property values - #13337

Merged
tiensonqin merged 3 commits into
masterfrom
logseq/fix-date-property-clear-81e2
Sep 21, 2026
Merged

tiensonqin merged 3 commits into
masterfrom
logseq/fix-date-property-clear-81e2

Conversation

@tiensonqin

@tiensonqin tiensonqin commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Fixes logseq/db-test#1245

Date type properties could not be reset to empty while staying on the node. The picker already passed del-btn?, but the trash control was mounted on react-day-picker's removed v8 Head slot, so it never rendered. Backspace also removed the whole property.

This change:

  • Renders the existing trash control through the v9 footer slot so it appears in the calendar
  • Clears a set date/datetime to empty-placeholder instead of retracting the attribute
  • Makes Backspace/Delete on a set date clear the value; a second delete on the empty value still removes the property

Tests cover the picker trash markup, the clear-vs-remove key path, and outliner persistence of an empty date/datetime property. Related namespaces frontend.components.datepicker-test, frontend.components.property.value-test, and logseq.outliner.date-property-test pass (55 tests, 134 assertions).

Open in Web Open in Cursor 

Copilot AI lite review requested due to automatic review settings September 20, 2026 17:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@tiensonqin
tiensonqin force-pushed the logseq/fix-date-property-clear-81e2 branch from 7def16c to a7f0cde Compare September 21, 2026 09:35
@tiensonqin tiensonqin self-assigned this Sep 21, 2026
cursoragent and others added 3 commits September 21, 2026 18:05
Date pickers mounted the trash control on react-day-picker's removed Head slot, so a set date could not be cleared without deleting the property. Render the control in footer and write empty-placeholder so the property stays on the node.

Co-authored-by: Tienson Qin <[email protected]>
Move the empty-placeholder persistence cases into src/test so bb dev:test compiles and runs them.

Co-authored-by: Tienson Qin <[email protected]>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@tiensonqin
tiensonqin force-pushed the logseq/fix-date-property-clear-81e2 branch from 8a0faf7 to 0536e12 Compare September 21, 2026 10:05
@tiensonqin
tiensonqin merged commit ca07bb9 into master Sep 21, 2026
8 checks passed
@tiensonqin
tiensonqin deleted the logseq/fix-date-property-clear-81e2 branch September 21, 2026 10:06
devin-ai-integration Bot added a commit that referenced this pull request Oct 1, 2026
* fix: allow clearing date property values

Date pickers mounted the trash control on react-day-picker's removed Head slot, so a set date could not be cleared without deleting the property. Render the control in footer and write empty-placeholder so the property stays on the node.

Co-authored-by: Tienson Qin <[email protected]>

* test: run date-property clear coverage in the app test build

Move the empty-placeholder persistence cases into src/test so bb dev:test compiles and runs them.

Co-authored-by: Tienson Qin <[email protected]>

* fix: align date picker delete button with nav buttons

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
devin-ai-integration Bot added a commit that referenced this pull request Oct 8, 2026
* fix: allow clearing date property values

Date pickers mounted the trash control on react-day-picker's removed Head slot, so a set date could not be cleared without deleting the property. Render the control in footer and write empty-placeholder so the property stays on the node.

Co-authored-by: Tienson Qin <[email protected]>

* test: run date-property clear coverage in the app test build

Move the empty-placeholder persistence cases into src/test so bb dev:test compiles and runs them.

Co-authored-by: Tienson Qin <[email protected]>

* fix: align date picker delete button with nav buttons

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
devin-ai-integration Bot added a commit that referenced this pull request Oct 8, 2026
* fix: allow clearing date property values

Date pickers mounted the trash control on react-day-picker's removed Head slot, so a set date could not be cleared without deleting the property. Render the control in footer and write empty-placeholder so the property stays on the node.

Co-authored-by: Tienson Qin <[email protected]>

* test: run date-property clear coverage in the app test build

Move the empty-placeholder persistence cases into src/test so bb dev:test compiles and runs them.

Co-authored-by: Tienson Qin <[email protected]>

* fix: align date picker delete button with nav buttons

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Date type properties cannot be cleared

3 participants