mirror of
https://github.com/xdan/datetimepicker.git
synced 2024-11-18 06:24:22 +00:00
Bug fixed
Padding button fixed
This commit is contained in:
parent
f4cf038d20
commit
5e02ecd865
@ -1,5 +1,8 @@
|
||||
<html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="jquery.datetimepicker.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<h3>DateTimePicker</h3>
|
||||
<input type="text" value="2014/03/15 05:06" id="datetimepicker"/><br><br>
|
||||
|
@ -60,10 +60,10 @@
|
||||
float:left;
|
||||
text-align:center;
|
||||
margin-left:8px;
|
||||
margin-top:5px;
|
||||
margin-top:0px;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_datepicker.active+.xdsoft_timepicker{
|
||||
margin-top:15px;
|
||||
margin-top:10px;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_mounthpicker{
|
||||
position: relative;
|
||||
@ -106,19 +106,23 @@
|
||||
background-position:-40px -15px;
|
||||
height: 15px;
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
display: block;
|
||||
margin-left:14px;
|
||||
margin-top:5px;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev{
|
||||
background-position:-40px 0px;
|
||||
margin-bottom:5px;
|
||||
margin-top:0px;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box{
|
||||
height:150px;
|
||||
height:151px;
|
||||
overflow:hidden;
|
||||
border-bottom:1px solid #DDDDDD;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div{
|
||||
background: #F5F5F5;
|
||||
border:1px solid #DDDDDD;
|
||||
border-top:1px solid #DDDDDD;
|
||||
color: #666666;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
@ -128,8 +132,9 @@
|
||||
height:25px;
|
||||
line-height:25px;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div:last-child{
|
||||
border-bottom-width:1px;
|
||||
|
||||
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div > div:first-child{
|
||||
border-top-width:0px;
|
||||
}
|
||||
.xdsoft_datetimepicker .xdsoft_next:hover,
|
||||
.xdsoft_datetimepicker .xdsoft_prev:hover {
|
||||
@ -224,6 +229,7 @@
|
||||
|
||||
.xdsoft_time_box{
|
||||
position:relative;
|
||||
border:1px solid #ccc;
|
||||
}
|
||||
.xdsoft_time_box > .xdsoft_scrollbar >.xdsoft_scroller{
|
||||
background:#ccc !important;
|
||||
|
@ -157,7 +157,7 @@
|
||||
if( !options.timepickerScrollbar )
|
||||
return;
|
||||
var sbh = scrollbar.height()-scroller[0].offsetHeight,
|
||||
pheight = timeboxparent[0].offsetHeight,
|
||||
pheight = timeboxparent[0].offsetHeight-2,
|
||||
height = timebox[0].offsetHeight,
|
||||
percent = offset/(height-pheight);
|
||||
scroller.css('margin-top',sbh*percent);
|
||||
@ -165,7 +165,7 @@
|
||||
.on( 'open.xdsoft',function( event ){
|
||||
if( !options.timepickerScrollbar )
|
||||
return;
|
||||
var pheight = timeboxparent[0].offsetHeight;
|
||||
var pheight = timeboxparent[0].offsetHeight-2;
|
||||
height = timebox[0].offsetHeight,
|
||||
percent = pheight/height,
|
||||
sh = percent*scrollbar[0].offsetHeight;
|
||||
@ -182,7 +182,7 @@
|
||||
datetimepicker.on('scroll.scrollbar',function(event,offset){
|
||||
var sbh = scrollbar[0].offsetHeight-scroller[0].offsetHeight,
|
||||
percent = offset/sbh;
|
||||
pheight = timeboxparent[0].offsetHeight,
|
||||
pheight = timeboxparent[0].offsetHeight-2,
|
||||
height = timebox[0].offsetHeight;
|
||||
timebox.css('marginTop',-parseInt((height-pheight)*percent))
|
||||
});
|
||||
@ -275,7 +275,7 @@
|
||||
timepicker.find('.xdsoft_prev,.xdsoft_next').mousedown(function(){
|
||||
var $this = $(this), timer = 0, stop = false, period = 110;
|
||||
(function(v){
|
||||
var pheight = timebox.parent()[0].offsetHeight,
|
||||
var pheight = timeboxparent[0].offsetHeight-2,
|
||||
height = timebox[0].offsetHeight,
|
||||
top = Math.abs(parseInt(timebox.css('marginTop')));
|
||||
if( $this.hasClass(options.next) && (height-pheight)- options.timeHeightInTimePicker>=top ){
|
||||
@ -366,9 +366,9 @@
|
||||
});
|
||||
datetimepicker.on( 'open.xdsoft',function(){
|
||||
if( timebox.find('.xdsoft_current').length ){
|
||||
var pheight = timebox.parent()[0].offsetHeight,
|
||||
var pheight = timeboxparent[0].offsetHeight-2,
|
||||
height = timebox[0].offsetHeight,
|
||||
top = timebox.find('.xdsoft_current').index()*options.timeHeightInTimePicker;
|
||||
top = timebox.find('.xdsoft_current').index()*options.timeHeightInTimePicker+1;
|
||||
if( (height-pheight)<top )
|
||||
top = height-pheight;
|
||||
timebox.css('marginTop','-'+parseInt(top)+'px');
|
||||
@ -414,7 +414,7 @@
|
||||
datetimepicker.mousewheel&&timepicker.mousewheel(function(event, delta, deltaX, deltaY) {
|
||||
if( !options.scrollTime )
|
||||
return true;
|
||||
var pheight = timebox.parent()[0].offsetHeight,
|
||||
var pheight = timeboxparent[0].offsetHeight-2,
|
||||
height = timebox[0].offsetHeight,
|
||||
top = Math.abs(parseInt(timebox.css('marginTop'))),
|
||||
fl = true;
|
||||
|
Loading…
Reference in New Issue
Block a user