wakirin / Litepicker

Date range picker - lightweight, no dependencies
MIT License
899 stars 132 forks source link

maxDate with 2 columns is showing unselectable month #272

Open viniciuscenci opened 3 years ago

viniciuscenci commented 3 years ago

Describe the bug When I use maxDate with 2 columns, sometimes the month shows up in column 1 instead of showing always as the last column... what I'm trying to do is allow the user to select a range in the past...

To Reproduce Steps to reproduce the behavior:

  1. Click the input to pick a date (in the codepen demo)
  2. See the result
  3. Refresh the page
  4. Repeat Step 1 until you see the difference

Expected behavior Always show like this: (the second column should be inside the range of maxDate)

Screen Shot 2021-10-01 at 2 08 17 PM

Instead of this : (maxDate falls inside the first column - which happens sometimes)

Screen Shot 2021-10-01 at 2 14 28 PM The last moth is useless since the maxDate is Oct 1st.

codepen.io https://codepen.io/viniciuscenci/pen/WNOWoWB