how to hide second and millisecond from jquery ui datetimepicker

Ahmed picture Ahmed · Apr 9, 2015 · Viewed 9.2k times · Source

I use jquery-datetimepicker in this link my simple code like this $(".datetimepicker").datetimepicker();

but the GUI appear like this

enter image description here

I want date calender and time by (Hours and Minutes) only appear in the widget I trying this code but no effects.

$(".datetimepicker").datetimepicker({
dateFormat: 'dd-mm-yy',
timeFormat: 'hh:mm tt',
showTimePicker: false, 
showSecond:false,
showMillisec:false,
showMicrosec:false,
showTimezone:false
});

Answer

Ahmed picture Ahmed · Apr 9, 2015

the problem is jquery-ui-timepicker-addon.css file not loaded correctly

it was like this

<link href='datetimepicker/src/jquery-ui-timepicker-addon.css'/>

I forgot to add link type

<link type='text/css' rel='stylesheet' href='datetimepicker/src/jquery-ui-timepicker-addon.css' />

it's working now . @zedd thank you very much . you put my hand in the problem point