Topic: Date picker embedded in stepper appear when step is loaded
eschroeder asked 6 years ago
Actually I am using version 4.6 of MDB which is not on the dropdown. I opened the date picker in the MBD editor, downloaded it and open the index page. The date picker worked fine. I then copied the sample code including the script to initialize the date picker in to the second step of the MBD stepper. When I select the second step of the stepper, the content for that step slides in from the right with the date picker calendar already open. Assuming that there is probably a conflict with the stepper java script and the date picker java script; I tried to launch the date picker with a button. That did not work either. The script for the button is below.
I have also had problems with embedding a MDB multiselect in the stepper. The same problem occurs, all the dropdown selections are displayed.
It looks like there is a conflict with the stepper and any form component.
<div class="md-form">
<input placeholder="Selected date" type="text" id="date-picker-example" class="form-control">
<label for="date-picker-example">Try me...</label><button class="waves-effect waves-dark btn btn-sm btn-primary pickDateBtn">CONTINUE</button>
</div>
<script>
$(".pickDateBtn").click(function(){
$('.datepicker').pickadate();
});
</script>
Piotr Glejzer staff answered 6 years ago
May you show me your code HTML about that problem? Because I don't see a problem with that. I tried to reconstruction this but it's working for me. You can put this code in our snippets. It doesn't matter that will not work.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Free
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.5.15
- Device: Desktop and Mobile
- Browser: Chrome 71.0.3578.9
- OS: Mac OS Mojave 10.14
- Provided sample code: Yes
- Provided link: No
Piotr Glejzer staff commented 6 years ago
Hi,
Yes, It is a problem with JS code from stepper and data picker. It's a bug. I added to our list to do to check it. Thanks for a report. Have a nice day.
Best,
Piotr
gwinnem@strong.tv pro commented 6 years ago
Hi Pjotr i would not say that this is a bug. The functionality is built into the stepper that it should set autofocus on the first input element in every newstep.This can easily be disabled with $('.stepper').mdbStepper({ autoFocusInput: 0 });Rgds Geirr
Piotr Glejzer staff commented 6 years ago
Yes, It is. Thanks for that. Have a nice day!