Datetimepicker with Bootstrap 5 Not Working Properly

I am quite new to JS and trying to add datetimepicker to my web-demo. The tutorial works properly with bootstrap 3.3.7, but when I change it to version 5, the calendar is not showing anymore.

Minimal working html is the following

<!-- this works OK -->
<!-- <link rel="stylesheet" href=""> -->
<!-- this does not! -->
<link rel="stylesheet" href="">
<link rel="stylesheet" href="">

<script src=""></script>
<script src=""></script>
<script src=""></script>
<script src=""></script>

<div class='input-group date' id='datetimepicker1'>
  <input type='text' class="form-control"/>
  <span class="input-group-addon\">  
    <span class="glyphicon glyphicon-calendar"></span>
  </span>
</div>

<script>
  $(".date").datetimepicker({locale: "ru"});
</script>

I use bootstrap@5.1.3 in the project and don't want to change it because of one datetimepicker. I've already tried many variants, but none worked. How can I get it to work?

As stated, is for Bootstrap 3, not Bootstrap 5.

What version should I use instead? (and how do I know that?)

Also note that I need {locale: "ru"} parameter, which is not available at bootsrap 3 AFAIK.

1 Answer

The successor is here:

It no longer requires Bootstrap, jQuery or Moment. Checkout the installation documentation here.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article
Twitter Facebook Pinterest