embedded picker disappearing on click

123 views
Skip to first unread message

Adam Multer

unread,
May 13, 2015, 7:15:49 PM5/13/15
to bootstrap-...@googlegroups.com
strange behavior with embedded datepicker disappearing on click.

here's the code:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Bootstrap: The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <title>datepicker test</title>

    <!-- Bootstrap -->
    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
    <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
    <!-- date picker -->
    <link href="css/bootstrap-datepicker.min.css" rel="stylesheet">
  </head>
  <body>
                    <div id="start-date-picker"></div>
                    <div id="end-date-picker"></div>
       
    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
    <!-- Latest compiled JavaScript -->
    <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
    <!-- date picker -->
    <script src="js/bootstrap-datepicker.min.js"></script>
    <script>
        $(function() {
            $('#start-date-picker').datepicker();
            $('#end-date-picker').datepicker();
        });
    </script>
       
    </body>
</html>

phil

unread,
May 24, 2015, 5:09:45 AM5/24/15
to bootstrap-...@googlegroups.com

Did you work out what this is? I have the same thing, latest version of everything. Something deep in jquery (2.1.3) is changing the div to display:none. A plain vanilla fiddle works as you'd expect, but on my actual site it's useless. Perhaps it's interacting with the bootstrap3 menu or something.
Message has been deleted

phil

unread,
May 24, 2015, 6:09:35 AM5/24/15
to bootstrap-...@googlegroups.com

Scratch that - the problem was mine, in my script bundling. Now all works  

Razvan Grigore

unread,
May 26, 2015, 2:48:04 PM5/26/15
to bootstrap-...@googlegroups.com
https://github.com/eternicode/bootstrap-datepicker/issues/1366

The strange this is that the demo page does not have this problem, it seem to have 1.4.1 stable from "somewhere"..
Reply all
Reply to author
Forward
0 new messages