1

So I have just upgraded to Bootstrap4 alpha and i actually really like it. The only thing thats making me go crazy, is the fact that my datetimepicker doesn't show the picker anymore !

I am running - jquery_3.1.1_min.js - bootstrap-4.0.0-alpha - datetimepicker.js v4.15.35 - datetimepicker.css v4.15.35 - moment.js v2.9.0

I saw there is a newer version of the picker on https://tempusdominus.github.io/bootstrap-3/ but this also did not work and failed to show the picker

has anyone had any experience with the picker and bootstrap 4 so far ? Would really appreciate the help have been rearranging includes and library versions all day to try and get this working again

My Code looks like:

<heade>
    <link href="bootstrap-4.0.0-alpha.6-dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="js/moment.js"></script>
    <script src="js/tempusdominus-bootstrap-3.min.js"></script>
</head>



<div class="col-sm">
    <div class="form-group">
        <input id="date" type="date" name="date" value="<?php echo($date) ?>" class="form-control form-control-sm">
    </div>
</div>



$(document).ready(function(){
    $('#date').datetimepicker();
})

And the the, even though the input has a value, it appears empty. And when the input is clicked on, it becomes active but the picker doesn't appear. There is no error.


Update

So I was able to get it working somewhat. If I add the data-target="#date" data-toggle="datetimepicker" attributes to the input i can at least toggle the picker. As the glyph icons have been removed from bootstrap 4 and I haven't yet added my own, the calendar and time icons are not shown.

The next bug now is, that the time panel is not being shown. I can change to the calendar panel but not back to time panel because it doesn't seem to exist.


Update

I have now opted for two input fields. One for the date which works fine. And one for time. The problem is, that when the picker is created like so:

$('#datetimepicker5').datetimepicker({
    format: 'LT'
});

The picker shows the days of the week .... instead of the time.

looking like so:

<div class="datepicker">
    <div class="datepicker-days" style="">
        <table class="table-condensed">
            <thead></thead>
        </table>
    </div>
</div>

So am now looking in on why this is happening ....

than for the help

chris

acrobat
  • 2,179
  • 2
  • 27
  • 35
Chris
  • 419
  • 2
  • 16
  • please share a minimal example, and the errors reported by browser console if any – Imran Ali Feb 17 '17 at 00:02
  • Better late than never :) but could [this be the answer](http://stackoverflow.com/questions/42130314/bootstrap-datetime-picker-not-working-with-bootstrap-4-alpha-6/42629938#42629938)? – sr9yar Mar 06 '17 at 15:54

0 Answers0