jQuery UI DateTimepicker - cannot hide the time

Ruben picture Ruben · Jul 16, 2012 · Viewed 25k times · Source

I'm using the date time picker component from http://trentrichardson.com/examples/timepicker/. Trying to hide the time picker but my code doesn't work:

$('#id_start_date_time').datetimepicker('option', 'showTimepicker', false);

Answer

Andrew Liu picture Andrew Liu · Dec 9, 2014

I just came across this issue. I know its been a while since this question was asked by the OP and he has probably solved the problem. Just for someone who might be encountering this issue in the future, if you want to hide the timepicker, just simply call the original jquery ui datepicker method

datepicker()

instead of

datetimepicker()