mymth / vanillajs-datepicker

A vanilla JavaScript remake of bootstrap-datepicker for Bulma and other CSS frameworks
MIT License
720 stars 147 forks source link

Max date based on another input value #131

Closed joseehilton147 closed 1 year ago

joseehilton147 commented 1 year ago

It's possible to set max date dynamic based on another date value?

For example, I have input A, and comes with today date, but I change it to same day next month manually, clicking on date.

Can I set max date on other's input based on input A value?

Example: Max date pre-defined: today + 6 months, but I changed input A current date to today + 1 month, for example 01/01/2023, so I would like to set all others input's max date to be based on 01/01/2023 and not today date who got prefilled when page loaded.

mymth commented 1 year ago

This is an example code I wrote for #112. The basic idea should be the same. https://codepen.io/mymth/pen/mdXrzZQ

joseehilton147 commented 1 year ago

thank you