Reputation: 19
is it possible to include time to bootstrap-datepicker because I could not find anything to include time, and if it is not possible what Is the attentive to bootstrap-datepicker that could work with bootstrap 5
here is my code
<input class="datepicker" data-date-format="mm/dd/yyyy">
$('.datepicker').datepicker({
format: 'mm/dd/yyyy',
startDate: '-3d'
});
Upvotes: 0
Views: 6922
Reputation: 6353
if it is not possible what Is the attentive to bootstrap-datepicker that could work with bootstrap 5
There are lots of alternatives. But I will recommend flatpickr. It's javascript/CSS framework independent.
// without jquery
flatpickr('.datepicker', {
// put options here if your don't want to add them via data- attributes
});
// with jquery
// $('.datepicker').flatpickr({ /* options here */ });
<!-- flatpickr CSS and javascript -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
<script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
<input class="form-control bg-white datepicker" data-date-format="m/d/Y G:iK" data-enable-time="true">
Upvotes: 3