I want to use bootstrap-datetimepicker with bootstrap 4 but I have some problems.
For this purpose I changed something like:
pull-right
to float-right
table-condensed
to table-sm
glyphicons
to fontawesome
but it did not work :(
Can anyone help me for converting this project to new bootstrap version?
We've made a fork with the fixes with detail documentation:
jQuery(document).ready(function($) {
if (window.jQuery().datetimepicker) {
$('.datetimepicker').datetimepicker({
// Formats
// follow MomentJS docs: https://momentjs.com/docs/#/displaying/format/
format: 'DD-MM-YYYY hh:mm A',
// Your Icons
// as Bootstrap 4 is not using Glyphicons anymore
icons: {
time: 'fa fa-clock-o',
date: 'fa fa-calendar',
up: 'fa fa-chevron-up',
down: 'fa fa-chevron-down',
previous: 'fa fa-chevron-left',
next: 'fa fa-chevron-right',
today: 'fa fa-check',
clear: 'fa fa-trash',
close: 'fa fa-times'
}
});
}
});
Thanks to Eonasdan
for the awesome library. Thanks to 非良 (wgbbiao
) for their fork too. Thanks to Camille Anelli's blog for the reminder about the icons.