Topic: TimePicker Cut Off in Modal
Adam Stapleton pro asked 6 years ago
Michal Szymanski staff answered 6 years ago
Hi Adam,
try this code:
.modal .picker .picker__holder { overflow: visible; }
Marta Wierzbicka staff answered 6 years ago
rjsnyderdesign pro answered 6 years ago
Adam Stapleton pro answered 6 years ago
Hi Michal,
This is a very easy to replicate error. Take your demo modal code, your timepicker demo code. Put the time picker in the modal and viola. The container property of pickatime is ignored and the timepicker is unusable. Hopefully this provides you with enough information.
<!-- Button trigger modal --> <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal"> Launch demo modal </button> <!-- Modal --> <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">Modal title</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <div class="md-form"> <input placeholder="Selected time" type="text" id="input_starttime" class="form-control timepicker"> <label for="input_starttime">Light version, 12hours</label> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> <button type="button" class="btn btn-primary">Save changes</button> </div> </div> </div> </div>
<script> $('.timepicker').pickatime({ container: $('body') }); </script>
Regards,
Adam
Michal Szymanski staff answered 6 years ago
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: Yes