mirror of
https://github.com/xdan/datetimepicker.git
synced 2024-11-18 06:24:22 +00:00
Fix round time
Time is rounded to the nearest value
This commit is contained in:
parent
c8fdf24bf3
commit
98f12c07dd
@ -35,7 +35,7 @@ $('#datetimepicker_mask').datetimepicker({
|
||||
mask:'9999/19/39 29:59',
|
||||
});
|
||||
$('#datetimepicker').datetimepicker();
|
||||
$('#datetimepicker').datetimepicker({value:'2015/04/15 05:06'});
|
||||
$('#datetimepicker').datetimepicker({value:'2015/04/15 05:03',step:10});
|
||||
$('#datetimepicker1').datetimepicker({
|
||||
datepicker:false,
|
||||
format:'H:i',
|
||||
|
@ -653,7 +653,7 @@
|
||||
(
|
||||
(parseInt(_xdsoft_datetime.currentTime.getHours())==parseInt(h)
|
||||
&&
|
||||
parseInt(_xdsoft_datetime.currentTime.getMinutes()/options.step)*options.step==parseInt(m)
|
||||
Math.round(_xdsoft_datetime.currentTime.getMinutes()/options.step)*options.step==parseInt(m)
|
||||
)?' xdsoft_current ':'')+
|
||||
((parseInt(today.getHours())==parseInt(h)&&parseInt(today.getMinutes())==parseInt(m))?' xdsoft_today ':'')+
|
||||
'" data-hour="'+h+'" data-minute="'+m+'">'+now.dateFormat(options.formatTime)+'</div>';
|
||||
|
Loading…
Reference in New Issue
Block a user