jQuery-Timepicker-Addon
jQuery-Timepicker-Addon copied to clipboard
How disable show seconds, milliseconds?
Hello,
yesterday I decided to try jQuery-Timepicker-Addon.
connected to project was good
<link rel="stylesheet" href="../css/font-awesome.min.css">
<script type="text/javascript" src="../js/bootstrap-select.min.js"></script>
<link rel="stylesheet" href="../css/bootstrap-select.min.css" />
<link rel="stylesheet" href="../css/jquery-ui.css" />
<script src="../js/jquery-ui.js"></script>
<link rel="stylesheet" href="../css/themes/base/jquery-ui.css">
<script type="text/javascript" src="../js/jquery-ui-timepicker-addon.js"></script>
<script type="text/javascript" src="../js/jquery-ui-sliderAccess.js"></script>
<div class="container">
<div class="row text-center">
<span>С</span>
<input type="text" id="datetime_from">
<span>По</span>
<input type="text" id="datetime_to">
</div>
after I tried to disable show Second and others
$('#datetime_from').datetimepicker( // $.timepicker.regional['ru'], { // minDate: getFormattedDate(new Date()), showSecond:false, showMillisec:false, showMicrosec:false, showTimezone:false, stepHour: 2, stepMinute: 10, stepSecond: 10, showTimePicker: false } );
But option showSecond:false and others not did not work...
How to solve this problem?
I ran into this too. Solved by downgrading to 1.4.6 https://github.com/trentrichardson/jQuery-Timepicker-Addon/releases/tag/v1.4.6 (1.5.5 has the issue, as well as 1.6).
I also ran into this, and downgrading to 1.4.6 worked for me as well.
I found what I was doing wrong, I needed to have jquery-ui-timepicker-addon.css imported into my html. With the css, this works great in 1.6. Mea culpa
This Q/A helped me, I was having the same issue and realized that the CSS was not importing. When CSS imported, it fixed this issue for me.
With V1.6.1, even with the jquery-ui-timepicker-addon.css, showSecond:false still not working.