Skip to content

Disabled dates for input type=date #5389

Open
@elliot41

Description

@elliot41

Hi dear lwc community,

Is it possible to implement this functionnality, that is also requested here : whatwg/html#9542

I copy/pasted the issue on the link below :

_"It appears to be pretty common to have some kind of feature to disable the selection of a certain set of dates in a . Currently, we only have min and max to play with.

Use-cases:

Disabled weekend dates
Disabled national holidays
Disabled dates because some business rule says so
The currently existing workarounds:

Validation - This requires the user to blindly try and pick dates, and see if they are allowed. Customer will likely get annoyed and demand that unallowed dates be disabled in the date picker.
Custom component - This undoubtedly comes with a myriad of accessibility problems, extra app footprint, and a reduced experience especially on mobile devices.
Dropdown list - This takes away the visual date picker, and only really works for a small set of allowable dates to pick from.
Proposal:

"_

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