"Date time picker DAY/MONTH/YEAR HOUR/MINUTE PICKER"
Bootstrap 4.0.0 Snippet by muhittinbudak

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"> <link href="//cdn.rawgit.com/Eonasdan/bootstrap-datetimepicker/e8bddc60e73c1ec2475f827be36e1957af72e2ea/build/css/bootstrap-datetimepicker.css" rel="stylesheet"> <script type="text/javascript" src="//code.jquery.com/jquery-2.1.1.min.js"></script> <script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment-with-locales.js"></script> <script src="//cdn.rawgit.com/Eonasdan/bootstrap-datetimepicker/e8bddc60e73c1ec2475f827be36e1957af72e2ea/src/js/bootstrap-datetimepicker.js"></script> <div class="container"> <div class="row"> <div class='col-6'> <center><h3>Text</h3></center> </div> </div> <div class="row"> <div class='col-lg-12'> <div class="form-group"> <label for="dtpickerdemo" class="col-sm-2 control-label">Select date/time:</label> <div class='col-sm-4 input-group date' id='dtpickerdemo'> <input name="date" class="form-control input-lg" type="text" value="12-02-2017"> <span class="input-group-addon"> <span class="glyphicon glyphicon-calendar"></span> </span> </div> </div> </div> </div> <br> <h1>Date and time picker. DAY/MONTH/YEAR HOUR/MINUTE PICKER</h1> </div>
$(document).ready(function(){ $('#dtpickerdemo').datetimepicker({ allowInputToggle : true,//toggle show calendar locale: 'tr' }).on('dp.change',function(event){ //$('#newDateSpan').html("New Date: " + event.date.format('lll')); //$('#oldDateSpan').html("Old Date: " + event.oldDate.format('lll')); $("h3").text($('input[name="date"]').val()); }); var date = new Date(); var todayDateTime = moment(date).format("DD.MM.YYYY HH:mm"); var date_input=$('input[name="date"]'); date_input.val(todayDateTime); date_input.focus(function(){ $("h3").text(todayDateTime); // $(".input-group-addon").trigger("click"); }); var options={ container: container, todayHighlight: true, autoclose: true, format: 'dd/mm/yyyy', language: 'tr', allowInputToggle : true }; }); //document ready

Related: See More


Questions / Comments: