Skip to content

Allow setMin() to adjust dateSelected when the current value is earlier than the new mininum #141

@jontjs

Description

@jontjs

Currently if you have a picker with, for example, 2023-08-11 selected, then use setMin() to change the minimum date to 2023-08-16, an error is thrown "Out-of-range" error is thrown.

It would be useful if there was an option for setMin() to adjust the selected date to the new minimum.

I can appreciate that this may not be a desirable default, so perhaps an optional (bool)adjustSelectedIfOutOfRange argument would be better. Or a separate method altogether.

I suppose the same reasoning applies to setMax(), though I personally haven't encountered that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions