Reputation: 471
Hey I am trying to use the bootstrap datetimepicker, but it seems as if every option I set is ignored. The default datetimepicker is displayed but I can't modify it in any way with the options given in the documentation. You can find the (not) working fiddle example here, where I am setting the sideByside attribute which obviously is not working.
This is my javascript
$(function () {
$('#bootstrap-datetimepicker-wrapper').datetimepicker({
defaultDate: "11/1/2013",
disabledDates: [
moment("10/02/2014"),
new Date(2014, 10, 21),
"10/05/2014 00:53"
],
sideBySide: true,
});
});
On the html site I pretty much use the minimum setup descripted here
Upvotes: 0
Views: 4172
Reputation: 1889
Make sure you check the JS libraries you're including match the examples/documentation you use to implement. Your original fiddle pulled in sources from here: http://www.malot.fr/bootstrap-datetimepicker/ but you followed instructions for this plugin: http://eonasdan.github.io/bootstrap-datetimepicker/
Ok - check out this fiddle: http://jsfiddle.net/bdv8nrhw/3/
Your second attempt was very close - you still used
`<input value="" class="form-control" id="id_starting_time" name="starting_time" title="" type="text" data-date-pickDate="false" />`
data-date-pickDate="false" was preventing your date-picker to work. You also don't have to initialize with
pickDate: true,
pickTime: true
those are defaults anyways - they won't hurt but are not necessary - Enjoy ;)
Upvotes: 1