I'm using the Smalot/bootstrap-datetimepicker as a time picker, using the options as follows:
$('#timepicker').datetimepicker({
format: 'hh:ii',
autoclose: 1,
startView: 1,
viewSelect: 4
});
This works as expected, with the target control value set to the selected time. However the datetimepicker still displays the long date at the top of the selector (27 February 2015 bit):
How can I get rid of this?
Looking at the JavaScript it is contained in the thead of the table contained in the divs with classes datetimepicker-minutes
and datetimepicker-hours
. I can't find a straightforward way of hiding the thead element without screwing up the rest of the form (I've tried thead/tr/td class=hidden, height:0).
Is there a way of hiding the content inside the thead without affecting the rest of the form?
https://github.com/smalot/bootstrap-datetimepicker/pull/346
It turns out that there is a branch with support for date-only and time-only selectors.