Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: datetime year autofill disable #55

Open
ar-to opened this issue Oct 5, 2023 · 0 comments
Open

docs: datetime year autofill disable #55

ar-to opened this issue Oct 5, 2023 · 0 comments

Comments

@ar-to
Copy link

ar-to commented Oct 5, 2023

Felt like a bug until I tracked it down to an option to disable. Consider adding this to the docs in the description so others know what options are available.

Version of this lib used at the time: "use-mask-input": "^3.3.6",

Options from this lib

prefillYear?: boolean | undefined;

Options from inputmask:

For this particular autofill fix I found it via RobinHerbots/Inputmask#2266 (comment), and via the prefillYea option at https://robinherbots.github.io/Inputmask/#/documentation/datetime#prefillyear.

Snippet:

      options: {
        inputFormat: 'mm/dd/yyyy',
        prefillYear: false,
      },

prevents the autofill for the year which may feel like unexpected behavior in some cases, e.g. data of birth which should not autofill to current year.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant