Datepicker year navigation broken with maximum date


Topic: Datepicker year navigation broken with maximum date

UNNdev pro premium priority asked 3 years ago

So you fixed navigation for Datepickers with a minimum date (https://mdbootstrap.com/support/standard/datepicker-year-navigation-broken-with-minimum-date/), now it's broken with a maximum date.

Expected behavior

I should be able to navigate to all years that are valid according to min and max params.

Actual behavior

  1. Create a Datepicker with the minimum date set to 2002-01-01 and the maximum date set to now (2021-07-02).
  2. Open the Datepicker, click on the July 2021 button and navigate one page back, then select the year 2002, the month January and the day 1.
  3. Open the Datepicker again, click on the January 2002 button and try to navigate forward to year 2021. You can't.

Resources (screenshots, code snippets etc.)

https://mdbootstrap.com/snippets/standard/kayem79/3171182


Dawid Wajszczuk staff answered 3 years ago

Hi,

Thanks for reporting this, I have added this to our TODO list.

Keep coding,
Dawid


UNNdev pro premium priority answered 3 years ago

Don't know if "Fixed date selection view navigation when min/max date is set in Datepicker" in 3.9.0 was supposed to address this issue, but it's still broken.


Dawid Wajszczuk staff commented 3 years ago

It is not related to this issue. It was addressed to this problem: https://mdbootstrap.com/support/standard/datepicker-allows-navigation-past-max-date-on-intial-render/


Boutrois pro premium priority commented 3 years ago

@Dawid Wajszczuk : when could we expect a fix for that one, I faced the same issue when the date picker already contains a value, it is never possible to access to the last range of 24 years which contains the max, the next 24 years button is always disabled. How to reproduce: Create a datepicker with a max date set to 2022-05-31, initialise the corresponding input element with value = 2012-07-13. Load the page and open the date picker, you will never be able to navigate to the 2016-2039 years while it should be possible.


Michał Duszak staff commented 3 years ago

@Boutrois Bug added to the ASAP list.


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 3.8.1
  • Device: PC
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: Yes