Topic: confirmDateOnSelect not working

KelsoField priority asked 11 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->


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

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

KelsoField priority commented 11 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 11 months ago

i don't see a problem. Both confirmDateOnSelect and format change works:

Please insert min. 20 characters.


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



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