Topic: confirmDateOnSelect not working

KelsoField priority asked 9 months ago


Expected behavior When clicking on a date, the datepicker modal closes and selected date added to input

Actual behavior Nothing happens

Resources (screenshots, code snippets etc.)

I have tried both via data attributes and options.

<-html-> <-div class="form-outline datepicker"> <-input type="text" class="form-control" id="sessionDate" /> <-label for="sessionDate" class="form-label">Select a date <-/html->

<-script->

const options = { format: 'dd-mm-yyyy', confirmDateOnSelect:true }

const pickerLaunch = new mdb.Datepicker(document.getElementById('sessionDate'), options) <-/script->


KelsoField priority commented 9 months ago

Additional information.It appears that the ",options)" are not being handled.

To reproduce:Using the JS example in the API documentation. Alter the date format of the output to yyy-mm-dd. You will see it is not changed?

If i go into mdb.min and manually alter confirmDateOnSelect: !1, to confirmDateOnSelect: !0, it works.

So the issue is the options handling?


Kamila Pieńkowska staff answered 9 months ago


i don't see a problem. Both confirmDateOnSelect and format change works: https://mdbootstrap.com/snippets/standard/kpienkowska/5495233



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

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 6.4.0
  • Device: *all
  • Browser: *all
  • OS: *all
  • Provided sample code: No
  • Provided link: No