Skip to content

prevent-min-max-navigation not working with max-date="null" and min-date="null" in combination #951

Closed
@NicoHof

Description

@NicoHof

Describe the bug
The arrow navigation is not longer working once there are null values provided for both min-date and max-date (and prevent-min-max-navigation is enabled)

If one or both of them are not null everything works as expected.
When both are null (which is according to the docs the default value for those props) the navigation does not react to user input at all.

  1. The buttons are not visually disabled. They appear clickable but nothing happens
  2. when min and max are null I think the intended behaviour is that there are no limitations (month and year change work, too)
  3. this can be workarounded like :prevent-min-max-navigation="!!(minDate || maxDate)" but should not be required IMO.

To Reproduce
https://codesandbox.io/p/sandbox/vue3-datepicker-min-max-issue-fms5nn

  • use the checkbox above to toggle the behaviour

Expected behavior
prevent-min-max-navigation should behave the same in this case like its: ":prevent-min-max-navigation="false"

Desktop & mobile (please complete the following information):

  • Library version 9.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions