Skip to content

[Bug] Date data validation shows "invalid" on empty cells despite allowBlank=true #6598

@taweijm

Description

@taweijm

Bug Description

When using date data validation with allowBlank set to true, empty cells incorrectly show an "Invalid" notification. The allowBlank setting is not being respected for date validation type.

Minimal Reproduction

https://gist.github.com/taweijm/bf5089eec89814a3f77677b37be6d87f

Save the HTML file and open it directly in a browser (no build step needed). Look at Column B.

Steps to Reproduce

  1. Open the reproduction HTML file in Chrome
  2. Column B has date validation with requireDateBetween(1900-01-01, 2099-12-31) and allowBlank: true
  3. Cells B2 and B3 have valid dates ("2025-06-15", "2025-12-01")
  4. Cells B4, B5, B6 are empty
  5. Look at empty cells B4, B5, B6 — they show "Invalid" notification despite allowBlank being enabled

Expected Behavior

Empty cells should be treated as valid when allowBlank is set to true.

Actual Behavior

Empty cells show "Invalid" notification even though allowBlank is enabled.

Environment

  • Univer version: 0.15.5
  • Browser: Chrome (latest)
  • OS: Windows 11

This is a resubmission of #6593 which was closed for lacking minimal reproduction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions