Sqrrl / wc-datepicker

A small, accessible and customizable datepicker written in TypeScript.
https://sqrrl.github.io/wc-datepicker
MIT License
54 stars 6 forks source link

[BUG] Console error is shown if a user enters unsupported year #13

Closed nasim-git closed 1 year ago

nasim-git commented 1 year ago

Describe the bug In Year field in datepicker, a user can enter the year number. If we enter invalid year number (For example: 1000000) Then a console error is being shown and the calendar is not clickable anymore even though you re enter a valid date. There should be a boundary on maximum Year that should be used. For example: 9999? User should not allow to enter any symbols except numbers: -, +, etc…

Reproduction Steps to reproduce the behavior:

  1. Go to https://sqrrl.github.io/wc-datepicker/#demo
  2. Change the year to 1000000
  3. Open the console
  4. See the js error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots https://ibb.co/NTq67rF

Context I tested this on your demo.

Sqrrl commented 1 year ago

Thanks for reporting. Will look into it.

Sqrrl commented 1 year ago

Fixed with v0.5.2.

nasim-git commented 1 year ago

Thanks @Sqrrl this bug was fixed.