Skip to content

[BUG][el-date-picker] Manual month adjustment in datetimerange can produce dates outside disabledDate range #350

@HiMary321

Description

@HiMary321

Description
When using el-date-picker with type="datetimerange", manually adjusting the month in the date panel can result in start or end dates that fall outside the range defined by disabledDate. The component does not validate or correct these out-of-range values.

Version
Element Plus version: 2.11.7(The latest version is the same.)
Vue version: 3.3.4
Browser: Chrome 145

Steps to Reproduce
Set disabledDate to disable any date after today (March 25, 2026), allowing only today and earlier dates.
Set default value to ['2026-03-24 00:00:00', '2026-03-25 23:59:59'].
Open the date picker panel and change the end date's month to February (e.g., from March to February). The start date's month automatically changes to January.
Then change the start date's month to March. The end date's month automatically changes to April.
Now the end date falls in April, which is outside the disabledDate range (since today is March 25, 2026). The component does not prevent or correct this.

Image Image Image

Expected Behavior
The date range should always remain within the bounds defined by disabledDate. If a manual adjustment would cause either date to become invalid, the component should either adjust it to the nearest valid date or prevent the change.

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