motss / app-datepicker

Datepicker element built with Google's lit and Material Design 2021
https://npm.im/app-datepicker
MIT License
180 stars 51 forks source link

minDate doesn't effects a year #122

Closed madiyetov closed 4 years ago

madiyetov commented 6 years ago

Description

Say datepicker has as minDate 16.04.2018. But it doesn't disable a years. So you can simply check 16.04.2017 with years picker.

Expected outcome

Can't select year earlier than min year.

Actual outcome

Can select year earlier than min year.

Live Demo

Check for demo in web components https://www.webcomponents.org/element/motss/app-datepicker/demo/demo/index.html

Steps to reproduce

  1. Put a app-datepicker element in the page.
  2. Open the page in a web browser.
  3. Set minDate.
  4. Try to select year earlier than minDate.
motss commented 6 years ago

@stat92 Thanks for reporting the bug. If you're interested in filing a PR, feel free to do so. Help is welcome! 😄

motss commented 6 years ago

@stat92 Perhaps re-render the year list when a minDate or maxDate is set?

madiyetov commented 6 years ago

@motss What's about PR ?

motss commented 4 years ago

Closing this in favor of v4. Highly recommend using v4 even if you are using polymer.

Thank you for the support.