I'm not sure why the following is happening but, I'm using datetimepicker1 from bootstrap, and when I try to get the selected value, I get undefined for
var date = $("#datetimepicker1").find("input").val();
but get the right date when I type $("#datetimepicker1").find("input").val();
on the console. HOw can I get the value of the date picked/selected so I can use it?
html
<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>
</div>
Also, Im trying to change the format of my date to "Jan 14 2016 hh:min:ss" using "M dd yyyy hh:ii:ss" but it gives me Fri (weekdays) instead of month names... The link I'm using is this one enter link description here