I use jquery-datetimepicker in this link
my simple code like this $(".datetimepicker").datetimepicker();
but the GUI appear like this
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
});
I use jquery-datetimepicker in this link
my simple code like this $(".datetimepicker").datetimepicker();
but the GUI appear like this
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
});
Share
Improve this question
asked Apr 9, 2015 at 6:39
AhmedAhmed
5561 gold badge4 silver badges22 bronze badges
1
- I tried it on JSFiddle. Don't be scared it's without CSS. But as you can see it works fine. jsfiddle.net/ujz4gt95 – Baximilian Commented Apr 9, 2015 at 7:10
2 Answers
Reset to default 16the 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
The documentation says that a null value for showMillisec and micro will auto detect the controls from timeFormat, so try to set them to null, or not setting them at all
The default of null will use detection from timeFormat.