Bootstrap datetime picker doesn't work, doesn't show any javascript errors


Dragon

I installed Bootstrap Datetimepicker with NuGet as suggested here , below is the html code that fails to display the datetimepicker control. In the chrome developer tools I see no problem with the script loading, or any script errors in the console. Any guesses why the code below fails to display the bootstrap datetime picker

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
         <script type="text/javascript" src="/scripts/jquery-1.9.1.min.js"></script>
  <script type="text/javascript" src="/scripts/bootstrap.min.js"></script>
  <script type="text/javascript" src="/scripts/moment.min.js"></script>
  <script type="text/javascript" src="/scripts/bootstrap-datetimepicker.js"></script>
  <link rel="stylesheet" href="/Content/bootstrap-datetimepicker.css" />
  <!-- include your less or built css files  -->
  <!-- 
  bootstrap-datetimepicker-build.less will pull in "../bootstrap/variables.less" and "bootstrap-datetimepicker.less";
  or-->

</head>
<body>
    <form>
    <div class="container">
    <div class="row">
        <div class='col-sm-6'>
            <div class="form-group">
                <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>
            </div>
        </div>
        <script type="text/javascript">
            $(function () {
                $('#datetimepicker1').datetimepicker();
            });
        </script>
    </div>
</div>
        </form>
</body>
</html>

Jav Rok

Your code works. What you are missing is Bootstrap CSS. There should be a calendar icon next to the input that you click to display it. But the calendar will also be unstyled.

Try putting this on your head:

 <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">

Related


Ajax doesn't work. it doesn't show any errors

Ati I am using Ajax in my application. Previously it worked fine and checked many times. Not working now. I didn't change anything in this code. I checked the URL path and also checked the Jquery click event. It doesn't show any errors in the console log. $(".

Bootstrap Datetime Picker doesn't work with Bootstrap 4 Alpha 6

Nivas We are using Eonasdan Datetime picker. We have migrated to Boostrap 4 Alpha 6 as it has many improvements over Alpha5, but the Datetime picker is broken. Now, when we click on the calendar icon in the datetime picker, it doesn't show the numbers. But it

Bootstrap Datetime Picker doesn't work with Bootstrap 4 Alpha 6

Nivas We are using Eonasdan Datetime picker. We have migrated to Boostrap 4 Alpha 6 as it has many improvements over Alpha5, but the Datetime picker is broken. Now, when we click on the calendar icon in the datetime picker, it doesn't show the numbers. But it

Bootstrap Datetime Picker doesn't work with Bootstrap 4 Alpha 6

Nivas We are using Eonasdan Datetime picker. We have migrated to Boostrap 4 Alpha 6 as it has many improvements over Alpha5, but the Datetime picker is broken. Now, when we click on the calendar icon in the datetime picker, it doesn't show the numbers. But it

Bootstrap Datetime Picker doesn't work with Bootstrap 4 Alpha 6

Nivas We are using Eonasdan Datetime picker. We have migrated to Boostrap 4 Alpha 6 as it has many improvements over Alpha5, but the Datetime picker is broken. Now, when we click on the calendar icon in the datetime picker, it doesn't show the numbers. But it

Bootstrap Datetime Picker doesn't work with Bootstrap 4 Alpha 6

Nivas We are using Eonasdan Datetime picker. We have migrated to Boostrap 4 Alpha 6 as it has many improvements over Alpha5, but the Datetime picker is broken. Now, when we click on the calendar icon in the datetime picker, it doesn't show the numbers. But it

Changing datetime picker language doesn't work

username I'm using and datetimepickerit's working fine, but I want to translate the language to "pl". But it doesn't work with any of the following options: $( ".input-group.date" ).datetimepicker({ format: "dd MM yyyy - hh:ii", autoclose: true, lo

Changing datetime picker language doesn't work

username I'm using and datetimepickerit's working fine, but I want to translate the language to "pl". But it doesn't work with any of the following options: $( ".input-group.date" ).datetimepicker({ format: "dd MM yyyy - hh:ii", autoclose: true, lo

Changing datetime picker language doesn't work

username I'm using and datetimepickerit's working fine, but I want to translate the language to "pl". But it doesn't work with any of the following options: $( ".input-group.date" ).datetimepicker({ format: "dd MM yyyy - hh:ii", autoclose: true, lo

Changing datetime picker language doesn't work

username I'm using and datetimepickerit's working fine, but I want to translate the language to "pl". But it doesn't work with any of the following options: $( ".input-group.date" ).datetimepicker({ format: "dd MM yyyy - hh:ii", autoclose: true, lo

jQuery code doesn't work but also doesn't show any errors

Lionheart Nerd I have some jQuery code that calls into a separate PHP file (which also contains a jQuery countdown clock), and although no errors are displayed, no jQuery code seems to be loaded. The code I use to call the stats_bar.php file is: <?php if(i

jQuery code doesn't work but also doesn't show any errors

Lionheart Nerd I have some jQuery code that calls into a separate PHP file (which also contains a jQuery countdown clock), and although no errors are displayed, no jQuery code seems to be loaded. The code I use to call the stats_bar.php file is: <?php if(i

pygame.font doesn't work and doesn't show any errors

Amar Prakash Pandey Everything works fine except the font, I don't know why this is happening, it doesn't even show any errors. without displaying the text on the screen. # import library here import pygame import time import sys # display init display_width

jQuery code doesn't work but also doesn't show any errors

Lionheart Nerd I have some jQuery code that calls into a separate PHP file (which also contains a jQuery countdown clock) and although no errors are displayed, no jQuery code seems to be loaded. The code I use to call the stats_bar.php file is: <?php if(is

jQuery code doesn't work but also doesn't show any errors

Lionheart Nerd I have some jQuery code that calls into a separate PHP file (which also contains a jQuery countdown clock), and although no errors are displayed, no jQuery code seems to be loaded. The code I use to call the stats_bar.php file is: <?php if(i

Python asyncio doesn't show any errors

superman I am trying to get some data from thousands of URLs by using asyncio. Here is a brief overview of the design: QueuePopulate a bunch of URLs at once with one URLProducer generate a bunchConsumers Each Consumerkeeps fetching urls from Queueand sending G

Python asyncio doesn't show any errors

superman I am trying to get some data from thousands of URLs by using asyncio. Here is a brief overview of the design: QueuePopulate a bunch of URLs at once with one URLProducer generate a bunchConsumers Each Consumerkeeps fetching urls from Queueand sending G

PHP doesn't show any errors

UserIsCorrupt I know this question has been asked many times in the past, but none of the solutions worked for me. Here is my PHP code: <?php function ?> This should generate an error. However, it just returns a 500 error and doesn't load. I tried the less

Python asyncio doesn't show any errors

superman I am trying to get some data from thousands of URLs by using asyncio. Here is a brief overview of the design: QueuePopulate a bunch of URLs at once with one URLProducer generate a bunchConsumers Each Consumerkeeps fetching urls from Queueand sending G

Python asyncio doesn't show any errors

superman I am trying to get some data from thousands of URLs by using asyncio. Here is a brief overview of the design: QueuePopulate a bunch of URLs at once with one URLProducer generate a bunchConsumers Each Consumerkeeps fetching urls from Queueand sending G

Electron window doesn't open but doesn't show any errors

Jeff Context: I 've seen this question, but it doesn't solve my problem. When I try to run my electron app, I don't get any errors and it seems to compile, but the electron window doesn't pop up. Reply: Date: 2019-05-08T03:02:22.036Z Hash: 3303fd48d099a538493f

ionic cordova doesn't build but doesn't show any errors

Tristan I just made a "new" ionic app, but I can't get Cordova to build the APK. I put the new quotes because I created a new project and copied over from the previous project's src. Something went horribly wrong with the dependencies of the plugin installed o

Electron window doesn't open but doesn't show any errors

Jeff Context: I 've seen this question, but it doesn't solve my problem. When I try to run my electron app, I don't get any errors and it seems to compile, but the electron window doesn't pop up. Reply: Date: 2019-05-08T03:02:22.036Z Hash: 3303fd48d099a538493f

Electron window doesn't open but doesn't show any errors

Jeff Context: I 've seen this question, but it doesn't solve my problem. When I try to run my electron app, I don't get any errors and it seems to compile, but the electron window doesn't pop up. Reply: Date: 2019-05-08T03:02:22.036Z Hash: 3303fd48d099a538493f

ionic cordova doesn't build but doesn't show any errors

Tristan I just made a "new" ionic app, but I can't get Cordova to build the APK. I put the new quotes because I created a new project and copied over from the previous project's src. Something went horribly wrong with the dependencies of the plugin installed o