Merge pull request #240 from u01jmg3/master

Fix to prevent times such as `12:60` instead of `13:00` when using an input of `xx:45 - xx:59`
This commit is contained in:
Valeriy 2015-02-24 14:48:40 +05:00
commit bede87d4cb
2 changed files with 344 additions and 268 deletions

View File

@ -1,12 +1,12 @@
.xdsoft_datetimepicker{ .xdsoft_datetimepicker {
box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.506); box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.506);
background: #FFFFFF; background: #fff;
border-bottom: 1px solid #BBBBBB; border-bottom: 1px solid #bbb;
border-left: 1px solid #CCCCCC; border-left: 1px solid #ccc;
border-right: 1px solid #CCCCCC; border-right: 1px solid #ccc;
border-top: 1px solid #CCCCCC; border-top: 1px solid #ccc;
color: #333333; color: #333;
font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
padding: 8px; padding: 8px;
padding-left: 0; padding-left: 0;
padding-top: 2px; padding-top: 2px;
@ -14,24 +14,25 @@
z-index: 9999; z-index: 9999;
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
display:none; display: none;
} }
.xdsoft_datetimepicker iframe { .xdsoft_datetimepicker iframe {
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
width: 75px; width: 75px;
height: 210px; height: 210px;
background: transparent; background: transparent;
border:none; border: none;
}
/*For IE8 or lower*/
.xdsoft_datetimepicker button {
border:none !important;
} }
.xdsoft_noselect{ /*For IE8 or lower*/
.xdsoft_datetimepicker button {
border: none !important;
}
.xdsoft_noselect {
-webkit-touch-callout: none; -webkit-touch-callout: none;
-webkit-user-select: none; -webkit-user-select: none;
-khtml-user-select: none; -khtml-user-select: none;
@ -40,92 +41,102 @@
-o-user-select: none; -o-user-select: none;
user-select: none; user-select: none;
} }
.xdsoft_noselect::selection { background: transparent; }
.xdsoft_noselect::-moz-selection { background: transparent; } .xdsoft_noselect::selection { background: transparent }
.xdsoft_datetimepicker.xdsoft_inline{ .xdsoft_noselect::-moz-selection { background: transparent }
.xdsoft_datetimepicker.xdsoft_inline {
display: inline-block; display: inline-block;
position: static; position: static;
box-shadow: none; box-shadow: none;
} }
.xdsoft_datetimepicker *{
.xdsoft_datetimepicker * {
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
.xdsoft_datetimepicker .xdsoft_datepicker, .xdsoft_datetimepicker .xdsoft_timepicker{
display:none; .xdsoft_datetimepicker .xdsoft_datepicker, .xdsoft_datetimepicker .xdsoft_timepicker {
display: none;
} }
.xdsoft_datetimepicker .xdsoft_datepicker.active, .xdsoft_datetimepicker .xdsoft_timepicker.active{
display:block; .xdsoft_datetimepicker .xdsoft_datepicker.active, .xdsoft_datetimepicker .xdsoft_timepicker.active {
display: block;
} }
.xdsoft_datetimepicker .xdsoft_datepicker{
.xdsoft_datetimepicker .xdsoft_datepicker {
width: 224px; width: 224px;
float:left; float: left;
margin-left:8px; margin-left: 8px;
} }
.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_datepicker{
.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_datepicker {
width: 256px; width: 256px;
} }
.xdsoft_datetimepicker .xdsoft_timepicker{
.xdsoft_datetimepicker .xdsoft_timepicker {
width: 58px; width: 58px;
float:left; float: left;
text-align:center; text-align: center;
margin-left:8px; margin-left: 8px;
margin-top: 0; margin-top: 0;
} }
.xdsoft_datetimepicker .xdsoft_datepicker.active+.xdsoft_timepicker{
margin-top:8px; .xdsoft_datetimepicker .xdsoft_datepicker.active+.xdsoft_timepicker {
margin-bottom:3px margin-top: 8px;
margin-bottom: 3px
} }
.xdsoft_datetimepicker .xdsoft_mounthpicker{
.xdsoft_datetimepicker .xdsoft_mounthpicker {
position: relative; position: relative;
text-align: center; text-align: center;
} }
.xdsoft_datetimepicker .xdsoft_label i, .xdsoft_datetimepicker .xdsoft_label i,
.xdsoft_datetimepicker .xdsoft_prev, .xdsoft_datetimepicker .xdsoft_prev,
.xdsoft_datetimepicker .xdsoft_next, .xdsoft_datetimepicker .xdsoft_next,
.xdsoft_datetimepicker .xdsoft_today_button{ .xdsoft_datetimepicker .xdsoft_today_button {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6Q0NBRjI1NjM0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6Q0NBRjI1NjQ0M0UwMTFFNDk4NkFGMzJFQkQzQjEw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YzMkVCRDNCMTBFQiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PoNEP54AAAIOSURBVHja7Jq9TsMwEMcxrZD4WpBYeKUCe+kTMCACHZh4BFfHO/AAIHZGFhYkBBsSEqxsLCAgXKhbXYOTxh9pfJVP+qutnZ5s/5Lz2Y5I03QhWji2GIcgAokWgfCxNvcOCCGKqiSqhUp0laHOne05vdEyGMfkdxJDVjgwDlEQgYQBgx+ULJaWSXXS6r/ER5FBVR8VfGftTKcITNs+a1XpcFoExREIDF14AVIFxgQUS+h520cdud6wNkC0UBw6BCO/HoCYwBhD8QCkQ/x1mwDyD4plh4D6DDV0TAGyo4HcawLIBBSLDkHeH0Mg2yVP3l4TQMZQDDsEOl/MgHQqhMNuE0D+oBh0CIr8MAKyazBH9WyBuKxDWgbXfjNf32TZ1KWm/Ap1oSk/R53UtQ5xTh3LUlMmT8gt6g51Q9p+SobxgJQ/qmsfZhWywGFSl0yBjCLJCMgXail3b7+rumdVJ2YRss4cN+r6qAHDkPWjPjdJCF4n9RmAD/V9A/Wp4NQassDjwlB6XBiCxcJQWmZZb8THFilfy/lfrTvLghq2TqTHrRMTKNJ0sIhdo15RT+RpyWwFdY96UZ/LdQKBGjcXpcc1AlSFEfLmouD+1knuxBDUVrvOBmoOC/rEcN7OQxKVeJTCiAdUzUJhA2Oez9QTkp72OTVcxDcXY8iKNkxGAJXmJCOQwOa6dhyXsOa6XwEGAKdeb5ET3rQdAAAAAElFTkSuQmCC);
} }
.xdsoft_datetimepicker .xdsoft_label i{ .xdsoft_datetimepicker .xdsoft_label i {
opacity:0.5; opacity: 0.5;
background-position:-92px -19px; background-position: -92px -19px;
display: inline-block; display: inline-block;
width: 9px; width: 9px;
height: 20px; height: 20px;
vertical-align: middle; vertical-align: middle;
} }
.xdsoft_datetimepicker .xdsoft_prev{ .xdsoft_datetimepicker .xdsoft_prev {
float: left; float: left;
background-position:-20px 0; background-position: -20px 0;
} }
.xdsoft_datetimepicker .xdsoft_today_button{ .xdsoft_datetimepicker .xdsoft_today_button {
float: left; float: left;
background-position:-70px 0; background-position: -70px 0;
margin-left:5px; margin-left: 5px;
} }
.xdsoft_datetimepicker .xdsoft_next{ .xdsoft_datetimepicker .xdsoft_next {
float: right; float: right;
background-position: 0 0; background-position: 0 0;
} }
.xdsoft_datetimepicker .xdsoft_next, .xdsoft_datetimepicker .xdsoft_next,
.xdsoft_datetimepicker .xdsoft_prev , .xdsoft_datetimepicker .xdsoft_prev ,
.xdsoft_datetimepicker .xdsoft_today_button{ .xdsoft_datetimepicker .xdsoft_today_button {
background-color: transparent; background-color: transparent;
background-repeat: no-repeat; background-repeat: no-repeat;
border: 0 none currentColor; border: 0 none;
cursor: pointer; cursor: pointer;
display: block; display: block;
height: 30px; height: 30px;
opacity: 0.5; opacity: 0.5;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
outline: medium none currentColor; outline: medium none;
overflow: hidden; overflow: hidden;
padding: 0; padding: 0;
position: relative; position: relative;
@ -133,286 +144,330 @@
white-space: nowrap; white-space: nowrap;
width: 20px; width: 20px;
} }
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev,
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_next{ .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev,
float:none; .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_next {
background-position:-40px -15px; float: none;
background-position: -40px -15px;
height: 15px; height: 15px;
width: 30px; width: 30px;
display: block; display: block;
margin-left:14px; margin-left: 14px;
margin-top:7px; margin-top: 7px;
}
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev{
background-position:-40px 0;
margin-bottom:7px;
margin-top: 0;
}
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box{
height:151px;
overflow:hidden;
border-bottom:1px solid #DDDDDD;
}
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div{
background: #F5F5F5;
border-top:1px solid #DDDDDD;
color: #666666;
font-size: 12px;
text-align: center;
border-collapse:collapse;
cursor:pointer;
border-bottom-width: 0;
height:25px;
line-height:25px;
} }
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div > div:first-child{ .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev {
border-top-width: 0; background-position: -40px 0;
margin-bottom: 7px;
margin-top: 0;
} }
.xdsoft_datetimepicker .xdsoft_today_button:hover,
.xdsoft_datetimepicker .xdsoft_next:hover, .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box {
.xdsoft_datetimepicker .xdsoft_prev:hover { height: 151px;
opacity: 1; overflow: hidden;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; border-bottom: 1px solid #ddd;
} }
.xdsoft_datetimepicker .xdsoft_label{
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div {
background: #f5f5f5;
border-top: 1px solid #ddd;
color: #666;
font-size: 12px;
text-align: center;
border-collapse: collapse;
cursor: pointer;
border-bottom-width: 0;
height: 25px;
line-height: 25px;
}
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div > div:first-child {
border-top-width: 0;
}
.xdsoft_datetimepicker .xdsoft_today_button:hover,
.xdsoft_datetimepicker .xdsoft_next:hover,
.xdsoft_datetimepicker .xdsoft_prev:hover {
opacity: 1;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
}
.xdsoft_datetimepicker .xdsoft_label {
display: inline; display: inline;
position: relative; position: relative;
z-index: 9999; z-index: 9999;
margin: 0; margin: 0;
padding: 5px 3px; padding: 5px 3px;
font-size: 14px; font-size: 14px;
line-height: 20px; line-height: 20px;
font-weight: bold; font-weight: bold;
background-color: #fff; background-color: #fff;
float:left; float: left;
width:182px; width: 182px;
text-align:center; text-align: center;
cursor:pointer; cursor: pointer;
} }
.xdsoft_datetimepicker .xdsoft_label:hover>span{
text-decoration:underline; .xdsoft_datetimepicker .xdsoft_label:hover>span {
text-decoration: underline;
} }
.xdsoft_datetimepicker .xdsoft_label:hover i{
opacity:1.0; .xdsoft_datetimepicker .xdsoft_label:hover i {
opacity: 1.0;
} }
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select{
border:1px solid #ccc; .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select {
position:absolute; border: 1px solid #ccc;
position: absolute;
right: 0; right: 0;
top:30px; top: 30px;
z-index:101; z-index: 101;
display:none; display: none;
background:#fff; background: #fff;
max-height:160px; max-height: 160px;
overflow-y:hidden; overflow-y: hidden;
} }
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_monthselect{right:-7px;}
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_yearselect{right:2px;} .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_monthselect{ right: -7px }
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover{ .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_yearselect{ right: 2px }
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover {
color: #fff; color: #fff;
background: #ff8000; background: #ff8000;
} }
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option{
padding:2px 10px 2px 5px; .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option {
text-decoration:none !important; padding: 2px 10px 2px 5px;
text-decoration: none !important;
} }
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current{
background: #33AAFF; .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current {
box-shadow: #178FE5 0 1px 3px 0 inset; background: #33aaff;
color:#fff; box-shadow: #178fe5 0 1px 3px 0 inset;
color: #fff;
font-weight: 700; font-weight: 700;
} }
.xdsoft_datetimepicker .xdsoft_month{
width:100px; .xdsoft_datetimepicker .xdsoft_month {
text-align:right; width: 100px;
text-align: right;
} }
.xdsoft_datetimepicker .xdsoft_calendar{
clear:both; .xdsoft_datetimepicker .xdsoft_calendar {
clear: both;
} }
.xdsoft_datetimepicker .xdsoft_year{
.xdsoft_datetimepicker .xdsoft_year{
width: 48px; width: 48px;
margin-left: 5px; margin-left: 5px;
} }
.xdsoft_datetimepicker .xdsoft_calendar table{
border-collapse:collapse; .xdsoft_datetimepicker .xdsoft_calendar table {
width:100%; border-collapse: collapse;
width: 100%;
} }
.xdsoft_datetimepicker .xdsoft_calendar td > div{
padding-right:5px; .xdsoft_datetimepicker .xdsoft_calendar td > div {
padding-right: 5px;
} }
.xdsoft_datetimepicker .xdsoft_calendar th{
.xdsoft_datetimepicker .xdsoft_calendar th {
height: 25px; height: 25px;
} }
.xdsoft_datetimepicker .xdsoft_calendar td,.xdsoft_datetimepicker .xdsoft_calendar th{
width:14.2857142%; .xdsoft_datetimepicker .xdsoft_calendar td,.xdsoft_datetimepicker .xdsoft_calendar th {
background: #F5F5F5; width: 14.2857142%;
border:1px solid #DDDDDD; background: #f5f5f5;
color: #666666; border: 1px solid #ddd;
color: #666;
font-size: 12px; font-size: 12px;
text-align: right; text-align: right;
vertical-align: middle; vertical-align: middle;
padding: 0; padding: 0;
border-collapse:collapse; border-collapse: collapse;
cursor:pointer; cursor: pointer;
height: 25px; height: 25px;
} }
.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar td,.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar th{ .xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar td,.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar th {
width:12.5%; width: 12.5%;
} }
.xdsoft_datetimepicker .xdsoft_calendar th{
background: #F1F1F1; .xdsoft_datetimepicker .xdsoft_calendar th {
background: #f1f1f1;
} }
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_today{
color:#33AAFF; .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_today {
color: #33aaff;
} }
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default,
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current, .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default,
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current{ .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current,
background: #33AAFF; .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current {
box-shadow: #178FE5 0 1px 3px 0 inset; background: #33aaff;
color:#fff; box-shadow: #178fe5 0 1px 3px 0 inset;
color: #fff;
font-weight: 700; font-weight: 700;
} }
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month,
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled, .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month,
.xdsoft_datetimepicker .xdsoft_time_box >div >div.xdsoft_disabled{ .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled,
opacity:0.5; .xdsoft_datetimepicker .xdsoft_time_box >div >div.xdsoft_disabled {
opacity: 0.5;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
cursor: default;
} }
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled{
opacity:0.2; .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled {
opacity: 0.2;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)"; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";
} }
.xdsoft_datetimepicker .xdsoft_calendar td:hover,
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div:hover{ .xdsoft_datetimepicker .xdsoft_calendar td:hover,
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div:hover {
color: #fff !important; color: #fff !important;
background: #ff8000 !important; background: #ff8000 !important;
box-shadow: none !important; box-shadow: none !important;
} }
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled:hover,
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_disabled:hover{ .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current.xdsoft_disabled:hover,
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div.xdsoft_current.xdsoft_disabled:hover {
background: #33aaff !important;
box-shadow: #178fe5 0 1px 3px 0 inset !important;
color: #fff !important;
}
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled:hover,
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_disabled:hover {
color: inherit !important; color: inherit !important;
background: inherit !important; background: inherit !important;
box-shadow: inherit !important; box-shadow: inherit !important;
} }
.xdsoft_datetimepicker .xdsoft_calendar th{
.xdsoft_datetimepicker .xdsoft_calendar th {
font-weight: 700; font-weight: 700;
text-align: center; text-align: center;
color: #999; color: #999;
cursor:default; cursor: default;
} }
.xdsoft_datetimepicker .xdsoft_copyright{ color:#ccc !important; font-size:10px;clear:both;float:none;margin-left:8px;}
.xdsoft_datetimepicker .xdsoft_copyright a{ color:#eee !important;}
.xdsoft_datetimepicker .xdsoft_copyright a:hover{ color:#aaa !important;}
.xdsoft_datetimepicker .xdsoft_copyright {
color: #ccc !important;
font-size: 10px;
clear: both;
float: none;
margin-left: 8px;
}
.xdsoft_time_box{ .xdsoft_datetimepicker .xdsoft_copyright a { color: #eee !important }
position:relative; .xdsoft_datetimepicker .xdsoft_copyright a:hover { color: #aaa !important }
border:1px solid #ccc;
.xdsoft_time_box {
position: relative;
border: 1px solid #ccc;
} }
.xdsoft_scrollbar >.xdsoft_scroller{ .xdsoft_scrollbar >.xdsoft_scroller {
background:#ccc !important; background: #ccc !important;
height:20px; height: 20px;
border-radius:3px; border-radius: 3px;
} }
.xdsoft_scrollbar{ .xdsoft_scrollbar {
position:absolute; position: absolute;
width:7px; width: 7px;
right: 0; right: 0;
top: 0; top: 0;
bottom: 0; bottom: 0;
cursor:pointer; cursor: pointer;
} }
.xdsoft_scroller_box{ .xdsoft_scroller_box {
position:relative; position: relative;
} }
.xdsoft_datetimepicker.xdsoft_dark {
.xdsoft_datetimepicker.xdsoft_dark{
box-shadow: 0 5px 15px -5px rgba(255, 255, 255, 0.506); box-shadow: 0 5px 15px -5px rgba(255, 255, 255, 0.506);
background: #000000; background: #000;
border-bottom: 1px solid #444444; border-bottom: 1px solid #444;
border-left: 1px solid #333333; border-left: 1px solid #333;
border-right: 1px solid #333333; border-right: 1px solid #333;
border-top: 1px solid #333333; border-top: 1px solid #333;
color: #cccccc; color: #ccc;
} }
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box{ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box {
border-bottom:1px solid #222222; border-bottom: 1px solid #222;
} }
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div{ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div {
background: #0a0a0a; background: #0a0a0a;
border-top:1px solid #222222; border-top: 1px solid #222;
color: #999999; color: #999;
} }
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label{ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_label {
background-color: #000; background-color: #000;
} }
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select{ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select {
border:1px solid #333; border: 1px solid #333;
background:#000; background: #000;
} }
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover{ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover {
color: #000; color: #000;
background: #007fff; background: #007fff;
} }
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current{ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current {
background: #cc5500; background: #cc5500;
box-shadow: #b03e00 0 1px 3px 0 inset; box-shadow: #b03e00 0 1px 3px 0 inset;
color:#000; color: #000;
} }
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label i, .xdsoft_datetimepicker.xdsoft_dark .xdsoft_label i,
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_prev, .xdsoft_datetimepicker.xdsoft_dark .xdsoft_prev,
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_next, .xdsoft_datetimepicker.xdsoft_dark .xdsoft_next,
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_today_button{ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_today_button {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLj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UbvZcWz7E8ykRMnIHGX1XPl+1m2vPYpL+2qdb8CDAARlKFEz/ZVkAAAAABJRU5ErkJggg==);
} }
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td, .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td,
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th {
background: #0a0a0a; background: #0a0a0a;
border:1px solid #222222; border: 1px solid #222;
color: #999999; color: #999;
} }
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th {
background: #0e0e0e; background: #0e0e0e;
} }
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_today{
color:#cc5500; .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_today {
color: #cc5500;
} }
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_default,
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_current, .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_default,
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current{ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_current,
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current {
background: #cc5500; background: #cc5500;
box-shadow: #b03e00 0 1px 3px 0 inset; box-shadow: #b03e00 0 1px 3px 0 inset;
color:#000; color: #000;
} }
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td:hover, .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td:hover,
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div:hover{ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div:hover {
color: #000 !important; color: #000 !important;
background: #007fff !important; background: #007fff !important;
} }
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{ .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th {
color: #666; color: #666;
} }
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright{ color:#333 !important;}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a{ color:#111 !important;}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a:hover{ color:#555 !important;}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright { color: #333 !important }
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a { color: #111 !important }
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a:hover { color: #555 !important }
.xdsoft_dark .xdsoft_time_box{ .xdsoft_dark .xdsoft_time_box {
border:1px solid #333; border: 1px solid #333;
}
.xdsoft_dark .xdsoft_scrollbar >.xdsoft_scroller{
background:#333 !important;
} }
.xdsoft_dark .xdsoft_scrollbar >.xdsoft_scroller {
background: #333 !important;
}

View File

@ -470,13 +470,15 @@
withoutCopyright: true, withoutCopyright: true,
inverseButton: false, inverseButton: false,
hours12: false, hours12: false,
next: 'xdsoft_next', next: 'xdsoft_next',
prev : 'xdsoft_prev', prev : 'xdsoft_prev',
dayOfWeekStart: 0, dayOfWeekStart: 0,
parentID: 'body', parentID: 'body',
timeHeightInTimePicker: 25, timeHeightInTimePicker: 25,
timepickerScrollbar: true, timepickerScrollbar: true,
todayButton: true, todayButton: true,
prevButton: true,
nextButton: true,
defaultSelect: true, defaultSelect: true,
scrollMonth: true, scrollMonth: true,
@ -489,6 +491,8 @@
allowBlank: true, allowBlank: true,
yearStart: 1950, yearStart: 1950,
yearEnd: 2050, yearEnd: 2050,
monthStart: 0,
monthEnd: 11,
style: '', style: '',
id: '', id: '',
fixed: false, fixed: false,
@ -825,8 +829,8 @@
} }
if (_options.disabledDates && $.isArray(_options.disabledDates) && _options.disabledDates.length) { if (_options.disabledDates && $.isArray(_options.disabledDates) && _options.disabledDates.length) {
options.disabledDates = $.extend(true, [], _options.disabledDates); options.disabledDates = $.extend(true, [], _options.disabledDates);
} }
if ((options.open || options.opened) && (!options.inline)) { if ((options.open || options.opened) && (!options.inline)) {
input.trigger('open.xdsoft'); input.trigger('open.xdsoft');
@ -884,6 +888,14 @@
.find('.xdsoft_today_button') .find('.xdsoft_today_button')
.css('visibility', !options.todayButton ? 'hidden' : 'visible'); .css('visibility', !options.todayButton ? 'hidden' : 'visible');
mounth_picker
.find('.' + options.prev)
.css('visibility', !options.prevButton ? 'hidden' : 'visible');
mounth_picker
.find('.' + options.next)
.css('visibility', !options.nextButton ? 'hidden' : 'visible');
if (options.mask) { if (options.mask) {
var e, var e,
getCaretPos = function (input) { getCaretPos = function (input) {
@ -1003,26 +1015,26 @@
.off('blur.xdsoft') .off('blur.xdsoft')
.on('blur.xdsoft', function () { .on('blur.xdsoft', function () {
if (options.allowBlank && !$.trim($(this).val()).length) { if (options.allowBlank && !$.trim($(this).val()).length) {
$(this).val(null); $(this).val(null);
datetimepicker.data('xdsoft_datetime').empty(); datetimepicker.data('xdsoft_datetime').empty();
} else if (!Date.parseDate($(this).val(), options.format)) { } else if (!Date.parseDate($(this).val(), options.format)) {
var splittedHours = +([$(this).val()[0], $(this).val()[1]].join('')), var splittedHours = +([$(this).val()[0], $(this).val()[1]].join('')),
splittedMinutes = +([$(this).val()[2], $(this).val()[3]].join('')); splittedMinutes = +([$(this).val()[2], $(this).val()[3]].join(''));
// parse the numbers as 0312 => 03:12 // parse the numbers as 0312 => 03:12
if(!options.datepicker && options.timepicker && splittedHours >= 0 && splittedHours < 24 && splittedMinutes >= 0 && splittedMinutes < 60) { if(!options.datepicker && options.timepicker && splittedHours >= 0 && splittedHours < 24 && splittedMinutes >= 0 && splittedMinutes < 60) {
$(this).val([splittedHours, splittedMinutes].map(function(item) { $(this).val([splittedHours, splittedMinutes].map(function(item) {
return item > 9 ? item : '0' + item return item > 9 ? item : '0' + item
}).join(':')); }).join(':'));
} else { } else {
$(this).val((_xdsoft_datetime.now()).dateFormat(options.format)); $(this).val((_xdsoft_datetime.now()).dateFormat(options.format));
} }
datetimepicker.data('xdsoft_datetime').setCurrentTime($(this).val()); datetimepicker.data('xdsoft_datetime').setCurrentTime($(this).val());
} else { } else {
datetimepicker.data('xdsoft_datetime').setCurrentTime($(this).val()); datetimepicker.data('xdsoft_datetime').setCurrentTime($(this).val());
} }
datetimepicker.trigger('changedatetime.xdsoft'); datetimepicker.trigger('changedatetime.xdsoft');
}); });
} }
@ -1448,7 +1460,12 @@
if((options.minDateTime !== false && options.minDateTime > optionDateTime) || (options.maxTime !== false && _xdsoft_datetime.strtotime(options.maxTime).getTime() < now.getTime()) || (options.minTime !== false && _xdsoft_datetime.strtotime(options.minTime).getTime() > now.getTime())) { if((options.minDateTime !== false && options.minDateTime > optionDateTime) || (options.maxTime !== false && _xdsoft_datetime.strtotime(options.maxTime).getTime() < now.getTime()) || (options.minTime !== false && _xdsoft_datetime.strtotime(options.minTime).getTime() > now.getTime())) {
classes.push('xdsoft_disabled'); classes.push('xdsoft_disabled');
} }
if ((options.initTime || options.defaultSelect || datetimepicker.data('changed')) && parseInt(_xdsoft_datetime.currentTime.getHours(), 10) === parseInt(h, 10) && (options.step > 59 || Math[options.roundTime](_xdsoft_datetime.currentTime.getMinutes() / options.step) * options.step === parseInt(m, 10))) {
var current_time = new Date(_xdsoft_datetime.currentTime);
current_time.setHours(parseInt(_xdsoft_datetime.currentTime.getHours(), 10));
current_time.setMinutes(Math[options.roundTime](_xdsoft_datetime.currentTime.getMinutes() / options.step) * options.step);
if ((options.initTime || options.defaultSelect || datetimepicker.data('changed')) && current_time.getHours() === parseInt(h, 10) && (options.step > 59 || current_time.getMinutes() === parseInt(m, 10))) {
if (options.defaultSelect || datetimepicker.data('changed')) { if (options.defaultSelect || datetimepicker.data('changed')) {
classes.push('xdsoft_current'); classes.push('xdsoft_current');
} else if (options.initTime) { } else if (options.initTime) {
@ -1488,7 +1505,7 @@
yearselect.children().eq(0) yearselect.children().eq(0)
.html(opt); .html(opt);
for (i = 0, opt = ''; i <= 11; i += 1) { for (i = parseInt(options.monthStart), opt = ''; i <= parseInt(options.monthEnd); i += 1) {
opt += '<div class="xdsoft_option ' + (_xdsoft_datetime.currentTime.getMonth() === i ? 'xdsoft_current' : '') + '" data-value="' + i + '">' + options.i18n[options.lang].months[i] + '</div>'; opt += '<div class="xdsoft_option ' + (_xdsoft_datetime.currentTime.getMonth() === i ? 'xdsoft_current' : '') + '" data-value="' + i + '">' + options.i18n[options.lang].months[i] + '</div>';
} }
monthselect.children().eq(0).html(opt); monthselect.children().eq(0).html(opt);
@ -1843,6 +1860,10 @@
} }
datetimepicker.data('xdsoft_datetime').setCurrentTime(this.value); datetimepicker.data('xdsoft_datetime').setCurrentTime(this.value);
break; break;
case 'validate':
var $input = datetimepicker.data('input');
$input.trigger('blur.xdsoft');
break;
} }
} else { } else {
datetimepicker datetimepicker