disablePat datepicker


Topic: disablePat datepicker

Christian Cazzaro pro asked 2 years ago

Hi

I am trying to disable past dates of datepicker via data attributes but it's not working.

Here it's my code:

<div class="form-outline datepicker" data-mdb-toggle-button="false">
              <input type="text" class="form-control" id="exampleDatepicker13" data-mdb-toggle="datepicker" data-mdb-disablePast="false"/>
              <label for="exampleDatepicker13" class="form-label">Check-in</label>
            </div>

Could you please help? Maybe I am doing something wrong?

Thank you


kpienkowska staff answered 2 years ago

When you declare via HTML you need to change Camelcase to lower case with a dash. Also, you need to set the value of the data attribute to true. Example snippet: https://mdbootstrap.com/snippets/standard/kpienkowska/4197897


Christian Cazzaro pro commented 2 years ago

It didn't work until I found out I had the 4.2.0 version of the package. Updated it to 4.3.0 and now it's working


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: No
  • Technology: MDB Standard
  • MDB Version: MDB5 4.3.0
  • Device: MacBook Pro
  • Browser: Chrome
  • OS: iOS
  • Provided sample code: No
  • Provided link: No
Tags