Fix bug with moment.js

This commit is contained in:
Valeriy 2014-09-24 17:14:57 +06:00
parent 40a33aa133
commit 9608473bf9
9 changed files with 167 additions and 329 deletions

BIN
IMAGE.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 950 B

View File

@ -1,6 +1,6 @@
{
"name":"datetimepicker",
"version":"2.3.4",
"version":"2.3.5",
"main": [
"jquery.datetimepicker.js",
"jquery.datetimepicker.css"

View File

@ -1,6 +1,6 @@
{
"name": "datetimepicker",
"version": "2.3.4",
"version": "2.3.5",
"title": "jQuery Date and Time picker",
"description": "jQuery plugin for date, time, or datetime manipulation in form",
"keywords": [

BIN
icons.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
icons2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 950 B

View File

@ -49,6 +49,9 @@
<h3>Custom Date Styling</h3>
<p>Make the background of the date 2 days from now bright red.</p>
<input type="text" id="datetimepicker12"/>
<h3>Dark theme</h3>
<p>thank for this <a href="https://github.com/lampslave">https://github.com/lampslave</a></p>
<input type="text" id="datetimepicker_dark"/>
</body>
<script src="./jquery.js"></script>
<script src="./jquery.datetimepicker.js"></script>
@ -168,5 +171,8 @@ $('#datetimepicker12').datetimepicker({
return [true, ""];
}
});
$('#datetimepicker_dark').datetimepicker({theme:'dark'})
</script>
</html>

View File

@ -1,307 +0,0 @@
.xdsoft_datetimepicker{
box-shadow: 0px 5px 15px -5px rgba(255, 255, 255, 0.506);
background: #000000;
border-bottom: 1px solid #444444;
border-left: 1px solid #333333;
border-right: 1px solid #333333;
border-top: 1px solid #333333;
color: #cccccc;
font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
padding: 8px;
padding-left: 0px;
padding-top: 2px;
position: absolute;
z-index: 9999;
-moz-box-sizing: border-box;
box-sizing: border-box;
display:none;
}
.xdsoft_datetimepicker iframe {
position: absolute;
left: 0;
top: 0;
width: 75px;
height: 210px;
background: transparent;
border:none;
}
/*For IE8 or lower*/
.xdsoft_datetimepicker button {
border:none !important;
}
.xdsoft_noselect{
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
}
.xdsoft_noselect::selection { background: transparent; }
.xdsoft_noselect::-moz-selection { background: transparent; }
.xdsoft_datetimepicker.xdsoft_inline{
display: inline-block;
position: static;
box-shadow: none;
}
.xdsoft_datetimepicker *{
-moz-box-sizing: border-box;
box-sizing: border-box;
padding:0px;
margin:0px;
}
.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{
width: 224px;
float:left;
margin-left:8px;
}
.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_datepicker{
width: 256px;
}
.xdsoft_datetimepicker .xdsoft_timepicker{
width: 58px;
float:left;
text-align:center;
margin-left:8px;
margin-top:0px;
}
.xdsoft_datetimepicker .xdsoft_datepicker.active+.xdsoft_timepicker{
margin-top:8px;
margin-bottom:3px
}
.xdsoft_datetimepicker .xdsoft_mounthpicker{
position: relative;
text-align: center;
}
.xdsoft_datetimepicker .xdsoft_prev, .xdsoft_datetimepicker .xdsoft_next,.xdsoft_datetimepicker .xdsoft_today_button{
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAAAeCAYAAACsYQl4AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gkRDgsOD4dcsgAAAhBJREFUaN7tmrFOHDEQhmcAnRQCTSQaXilAD/cEVyBIUqTiEYzMO/AAIHrKNDRICDokJGjpaBKFfGkMMsvu7a7t5TDySNbdeb2j8bfe32P7FJBiw9tcQVBAF9DF+ttC7h1Q1dp6wIjIvKruNlwvoGPNQf7+BLQJdpGORJCd7QC2gB4W8vuBDbQVE3HvVC0EbFcfbb4BQ7vZvrGnKl0a0QQ7BrSDTArQHSG/gB3yMGv6MAG+dRmIXUHXwg4N1INMgtHSB/Iz7FjQwFfP32ZK0K9ghwRagcxbv8Ix8uT1Yb3m4Y1Tgn4BO0BHbY2/rEADa1PelK2UoJ9h99RR2+ArG9AVuWiyzZSgcdrYNVg7xU8WoIGNHnPAuAo6Jo+e79H2MfP8fCIixzWXTkTkqKb+EPjZN3OITpFaUjDJoJwB58AvL+49j+G2V3/l2l7GSoeNmAxNpqDnXPxPoP8Co8qAfXDXboARoDHScRCzQaOqP0RkP8Mdwn/u64onhcse5JGI/HY/v6jqH1UlVDpswgWLSTiibcCCxQRmHfeej1Wvfqni/3No1mEHWIKbhEvwPrBN6BIcOAXugGtgxatfBC6AW/f5KQS0HXBTySTMcW1XyLPYVNLcT8H9ExY3KHYamu67OWImJywfaj/aTdQHbZDLxv8wsGcO+cOeGarqrpOGx/cAWUTy1+hcrPyvo4AuoIsF2H8FLf0jpJIACgAAAABJRU5ErkJggg==');
}
.xdsoft_datetimepicker .xdsoft_prev{
float: left;
background-position:-20px 0px;
}
.xdsoft_datetimepicker .xdsoft_today_button{
float: left;
background-position:-70px 0px;
margin-left:5px;
}
.xdsoft_datetimepicker .xdsoft_next{
float: right;
background-position:0px 0px;
}
.xdsoft_datetimepicker .xdsoft_next:active,.xdsoft_datetimepicker .xdsoft_prev:active{
}
.xdsoft_datetimepicker .xdsoft_next,.xdsoft_datetimepicker .xdsoft_prev ,.xdsoft_datetimepicker .xdsoft_today_button{
background-color: transparent;
background-repeat: no-repeat;
border: 0px none currentColor;
cursor: pointer;
display: block;
height: 30px;
opacity: 0.5;
outline: medium none currentColor;
overflow: hidden;
padding: 0px;
position: relative;
text-indent: 100%;
white-space: nowrap;
width: 20px;
}
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev,
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_next{
float:none;
background-position:-40px -15px;
height: 15px;
width: 30px;
display: block;
margin-left:14px;
margin-top:7px;
}
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev{
background-position:-40px 0px;
margin-bottom:7px;
margin-top:0px;
}
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box{
height:151px;
overflow:hidden;
border-bottom:1px solid #222222;
}
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div{
background: #0a0a0a;
border-top:1px solid #222222;
color: #999999;
font-size: 12px;
text-align: center;
border-collapse:collapse;
cursor:pointer;
border-bottom-width:0px;
height:25px;
line-height:25px;
}
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div > div:first-child{
border-top-width:0px;
}
.xdsoft_datetimepicker .xdsoft_today_button:hover,
.xdsoft_datetimepicker .xdsoft_next:hover,
.xdsoft_datetimepicker .xdsoft_prev:hover {
opacity: 1;
}
.xdsoft_datetimepicker .xdsoft_label{
display: inline;
position: relative;
z-index: 9999;
margin: 0;
padding: 5px 3px;
font-size: 14px;
line-height: 20px;
font-weight: bold;
background-color: #000;
float:left;
width:182px;
text-align:center;
cursor:pointer;
}
.xdsoft_datetimepicker .xdsoft_label:hover{
text-decoration:underline;
}
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select{
border:1px solid #333;
position:absolute;
right:0px;
top:30px;
z-index:101;
display:none;
background:#000;
max-height:160px;
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 > div > .xdsoft_option:hover{
color: #000;
background: #007fff;
}
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option{
padding:2px 10px 2px 5px;
}
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current{
background: #cc5500;
box-shadow: #b03e00 0px 1px 3px 0px inset;
color:#000;
font-weight: 700;
}
.xdsoft_datetimepicker .xdsoft_month{
width:90px;
text-align:right;
}
.xdsoft_datetimepicker .xdsoft_calendar{
clear:both;
}
.xdsoft_datetimepicker .xdsoft_year{
width:56px;
}
.xdsoft_datetimepicker .xdsoft_calendar table{
border-collapse:collapse;
width:100%;
}
.xdsoft_datetimepicker .xdsoft_calendar td > div{
padding-right:5px;
}
.xdsoft_datetimepicker .xdsoft_calendar th{
height: 25px;
}
.xdsoft_datetimepicker .xdsoft_calendar td,.xdsoft_datetimepicker .xdsoft_calendar th{
width:14.2857142%;
background: #0a0a0a;
border:1px solid #222222;
color: #999999;
font-size: 12px;
text-align: right;
vertical-align: middle;
padding:0px;
border-collapse:collapse;
cursor:pointer;
height: 25px;
}
.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar td,.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar th{
width:12.5%;
}
.xdsoft_datetimepicker .xdsoft_calendar th{
background: #0e0e0e;
}
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_today{
color:#cc5500;
}
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default,
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current,
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current{
background: #cc5500;
box-shadow: #b03e00 0px 1px 3px 0px inset;
color:#000;
font-weight: 700;
}
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month,
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled,
.xdsoft_datetimepicker .xdsoft_time_box >div >div.xdsoft_disabled{
opacity:0.5;
}
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled{
opacity:0.2;
}
.xdsoft_datetimepicker .xdsoft_calendar td:hover,
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div:hover{
color: #000 !important;
background: #007fff !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{
color: inherit !important;
background: inherit !important;
box-shadow: inherit !important;
}
.xdsoft_datetimepicker .xdsoft_calendar th{
font-weight: 700;
text-align: center;
color: #666;
cursor:default;
}
.xdsoft_datetimepicker .xdsoft_copyright{ color:#333 !important; font-size:10px;clear:both;float:none;margin-left:8px;}
.xdsoft_datetimepicker .xdsoft_copyright a{ color:#111 !important;}
.xdsoft_datetimepicker .xdsoft_copyright a:hover{ color:#555 !important;}
.xdsoft_time_box{
position:relative;
border:1px solid #333;
}
.xdsoft_scrollbar >.xdsoft_scroller{
background:#333 !important;
height:20px;
border-radius:3px;
}
.xdsoft_scrollbar{
position:absolute;
width:7px;
right:0px;
top:0px;
bottom:0px;
cursor:pointer;
}
.xdsoft_scroller_box{
position:relative;
}

View File

@ -83,9 +83,19 @@
text-align: center;
}
.xdsoft_datetimepicker .xdsoft_prev, .xdsoft_datetimepicker .xdsoft_next,.xdsoft_datetimepicker .xdsoft_today_button{
.xdsoft_datetimepicker .xdsoft_prev,
.xdsoft_datetimepicker .xdsoft_next,
.xdsoft_datetimepicker .xdsoft_today_button{
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAAAeCAYAAACsYQl4AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDozQjRCQjRGREU4MkNFMzExQjRDQkIyRDJDOTdBRUI1MCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpCQjg0OUYyNTZDODAxMUUzQjMwM0IwMERBNUU0ODQ5NSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpCQjg0OUYyNDZDODAxMUUzQjMwM0IwMERBNUU0ODQ5NSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M2IChXaW5kb3dzKSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkI5NzE3MjFBN0E2Q0UzMTFBQjJEQjgzMDk5RTNBNTdBIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjNCNEJCNEZERTgyQ0UzMTFCNENCQjJEMkM5N0FFQjUwIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+aQvATgAAAfVJREFUeNrsmr1OwzAQxzGtkPjYEAuvVGAvfQIGRKADE49gdLwDDwBiZ2RhQUKwICQkWLsgFiRQuIBTucFJ/XFp4+hO+quqnZ4uvzj2nV2RpukCW/22yAgYNINmc7du7DcghCjrkqgOKjF1znpt6rZ0AGWQj7TvCU8d9UM+QAGDrhdyc2Bnc1WVVPBev9V8lBnY+rDwncWZThG4xk4lmxtJy2AHgoY/FySgbSBPwPZ8mEXbQx3aDERb0EbYAYFC7pcAtAvkMWwC0D3NX58S9D/YnoGC7nPWr3Dg9JTbtuHhDShBT8D2CBSK/iIEvVXxpuxSgh7DdgwUTL4iA92zmJb6lKB/YTsECmV+IgK947AGDIqgQ/LojsO135Hn51l2cWlov0JdGNrPUceueXRwilSVgkUyom9Rd6gbLfYTDeO+1v6orn0InTogYDGUkYLO3/wc9BdqqTCKP1Tfi+oTIaCBIL2TES+GTyruT9S61p6BHam+99DFEAgLFklYsIBHwSI9QY80H5ta+1rB/6ovaKihBJeEJbgLbBlQgl+j3lDPqA2tfQV1j3pVn8s+oKHGTSVJ+FqDLeR5bCqJ2E/BCycsoLZETXaKGs7rhKVt+9HZScrZNMi88V8P7LlDbvOZYaJVpMMmBCT4n0o8dTBoNgbdWPsRYACs3r7XyNfbnAAAAABJRU5ErkJggg==');
}
.xdsoft_datetimepicker .xdsoft_label{
background:no-repeat right center;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAADCAYAAACwAX77AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6REM3RDczNjQ0M0Q0MTFFNEFBMDZGNDcyNDc1RjU2NkYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6REM3RDczNjU0M0Q0MTFFNEFBMDZGNDcyNDc1RjU2NkYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpEQzdENzM2MjQzRDQxMUU0QUEwNkY0NzI0NzVGNTY2RiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpEQzdENzM2MzQzRDQxMUU0QUEwNkY0NzI0NzVGNTY2RiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqM605YAAAAqSURBVHjaYmRgYPAEYksGVHCMGUjcAWIOIJaFCQLxDmRVIJ0eMA5AgAEAqQ8EXYYe2XkAAAAASUVORK5CYII=);
padding-right:10px !important;
}
.xdsoft_datetimepicker .xdsoft_prev{
float: left;
background-position:-20px 0px;
@ -102,7 +112,9 @@
}
.xdsoft_datetimepicker .xdsoft_next:active,.xdsoft_datetimepicker .xdsoft_prev:active{
}
.xdsoft_datetimepicker .xdsoft_next,.xdsoft_datetimepicker .xdsoft_prev ,.xdsoft_datetimepicker .xdsoft_today_button{
.xdsoft_datetimepicker .xdsoft_next,
.xdsoft_datetimepicker .xdsoft_prev ,
.xdsoft_datetimepicker .xdsoft_today_button{
background-color: transparent;
background-repeat: no-repeat;
border: 0px none currentColor;
@ -206,14 +218,15 @@
font-weight: 700;
}
.xdsoft_datetimepicker .xdsoft_month{
width:90px;
width:100px;
text-align:right;
}
.xdsoft_datetimepicker .xdsoft_calendar{
clear:both;
}
.xdsoft_datetimepicker .xdsoft_year{
width:56px;
width: 43px;
margin-left: 5px;
}
.xdsoft_datetimepicker .xdsoft_calendar table{
border-collapse:collapse;
@ -309,3 +322,91 @@
.xdsoft_scroller_box{
position:relative;
}
.xdsoft_datetimepicker.xdsoft_dark{
box-shadow: 0px 5px 15px -5px rgba(255, 255, 255, 0.506);
background: #000000;
border-bottom: 1px solid #444444;
border-left: 1px solid #333333;
border-right: 1px solid #333333;
border-top: 1px solid #333333;
color: #cccccc;
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box{
border-bottom:1px solid #222222;
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div{
background: #0a0a0a;
border-top:1px solid #222222;
color: #999999;
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label{
background-color: #000;
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select{
border:1px solid #333;
background:#000;
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover{
color: #000;
background: #007fff;
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current{
background: #cc5500;
box-shadow: #b03e00 0px 1px 3px 0px inset;
color:#000;
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_prev,
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_next,
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_today_button{
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAAAeCAYAAACsYQl4AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gkRDgsOD4dcsgAAAhBJREFUaN7tmrFOHDEQhmcAnRQCTSQaXilAD/cEVyBIUqTiEYzMO/AAIHrKNDRICDokJGjpaBKFfGkMMsvu7a7t5TDySNbdeb2j8bfe32P7FJBiw9tcQVBAF9DF+ttC7h1Q1dp6wIjIvKruNlwvoGPNQf7+BLQJdpGORJCd7QC2gB4W8vuBDbQVE3HvVC0EbFcfbb4BQ7vZvrGnKl0a0QQ7BrSDTArQHSG/gB3yMGv6MAG+dRmIXUHXwg4N1INMgtHSB/Iz7FjQwFfP32ZK0K9ghwRagcxbv8Ix8uT1Yb3m4Y1Tgn4BO0BHbY2/rEADa1PelK2UoJ9h99RR2+ArG9AVuWiyzZSgcdrYNVg7xU8WoIGNHnPAuAo6Jo+e79H2MfP8fCIixzWXTkTkqKb+EPjZN3OITpFaUjDJoJwB58AvL+49j+G2V3/l2l7GSoeNmAxNpqDnXPxPoP8Co8qAfXDXboARoDHScRCzQaOqP0RkP8Mdwn/u64onhcse5JGI/HY/v6jqH1UlVDpswgWLSTiibcCCxQRmHfeej1Wvfqni/3No1mEHWIKbhEvwPrBN6BIcOAXugGtgxatfBC6AW/f5KQS0HXBTySTMcW1XyLPYVNLcT8H9ExY3KHYamu67OWImJywfaj/aTdQHbZDLxv8wsGcO+cOeGarqrpOGx/cAWUTy1+hcrPyvo4AuoIsF2H8FLf0jpJIACgAAAABJRU5ErkJggg==');
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td,
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{
background: #0a0a0a;
border:1px solid #222222;
color: #999999;
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{
background: #0e0e0e;
}
.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_timepicker .xdsoft_time_box >div >div.xdsoft_current{
background: #cc5500;
box-shadow: #b03e00 0px 1px 3px 0px inset;
color:#000;
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td:hover,
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div:hover{
color: #000 !important;
background: #007fff !important;
}
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{
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_dark .xdsoft_time_box{
border:1px solid #333;
}
.xdsoft_dark .xdsoft_scrollbar >.xdsoft_scroller{
background:#333 !important;
}

View File

@ -1,5 +1,5 @@
/**
* @preserve jQuery DateTimePicker plugin v2.3.4
* @preserve jQuery DateTimePicker plugin v2.3.5
* @homepage http://xdsoft.net/jqplugins/datetimepicker/
* (c) 2014, Chupurnov Valeriy.
*/
@ -249,7 +249,7 @@
timepicker:true,
datepicker:true,
weeks:false,
weeks:true,
defaultTime:false, // use formatTime format (ex. '10:00' for formatTime: 'H:i')
defaultDate:false, // use formatDate format (ex new Date() or '1986/12/08' or '-1970/01/05' or '-1970/01/05')
@ -264,9 +264,12 @@
initTime:true,
inline:false,
theme:'',
onSelectDate:function() {},
onSelectTime:function() {},
onChangeMonth:function() {},
onChangeYear:function() {},
onChangeDateTime:function() {},
onShow:function() {},
onClose:function() {},
@ -477,7 +480,7 @@
createDateTimePicker = function( input ) {
var datetimepicker = $('<div '+(options.id?'id="'+options.id+'"':'')+' '+(options.style?'style="'+options.style+'"':'')+' class="xdsoft_datetimepicker xdsoft_noselect '+(options.weeks?' xdsoft_showweeks':'')+options.className+'"></div>'),
var datetimepicker = $('<div '+(options.id?'id="'+options.id+'"':'')+' '+(options.style?'style="'+options.style+'"':'')+' class="xdsoft_datetimepicker xdsoft_'+options.theme+' xdsoft_noselect '+(options.weeks?' xdsoft_showweeks':'')+options.className+'"></div>'),
xdsoft_copyright = $('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),
datepicker = $('<div class="xdsoft_datepicker active"></div>'),
mounth_picker = $('<div class="xdsoft_mounthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button><div class="xdsoft_label xdsoft_month"><span></span></div><div class="xdsoft_label xdsoft_year"><span></span></div><button type="button" class="xdsoft_next"></button></div>'),
@ -501,18 +504,22 @@
mounth_picker
.find('.xdsoft_month,.xdsoft_year')
.on('mousedown.xdsoft',function(event) {
var select = $(this).find('.xdsoft_select').eq(0),
val = 0,
top = 0,
visible = select.is(':visible');
mounth_picker
.find('.xdsoft_select')
.hide();
var select = $(this).find('.xdsoft_select').eq(0),
val = 0,
top = 0;
if( _xdsoft_datetime.currentTime )
val = _xdsoft_datetime.currentTime[$(this).hasClass('xdsoft_month')?'getMonth':'getFullYear']();
select.show();
select[visible?'hide':'show']();
for(var items = select.find('div.xdsoft_option'),i = 0;i<items.length;i++) {
if( items.eq(i).data('value')==val ) {
@ -534,6 +541,7 @@
event.preventDefault();
})
.on('mousedown.xdsoft','.xdsoft_option',function( event ) {
var year = _xdsoft_datetime.currentTime.getFullYear();
if( _xdsoft_datetime&&_xdsoft_datetime.currentTime )
_xdsoft_datetime.currentTime[$(this).parent().parent().hasClass('xdsoft_monthselect')?'setMonth':'setFullYear']($(this).data('value'));
@ -541,6 +549,10 @@
datetimepicker.trigger('xchange.xdsoft');
options.onChangeMonth&&options.onChangeMonth.call&&options.onChangeMonth.call(datetimepicker,_xdsoft_datetime.currentTime,datetimepicker.data('input'));
if( year!=_xdsoft_datetime.currentTime.getFullYear() && $.isFunction(options.onChangeYear) ){
options.onChangeYear.call(datetimepicker,_xdsoft_datetime.currentTime,datetimepicker.data('input'));
}
});
@ -766,7 +778,8 @@
.append(mounth_picker)
.append(calendar);
$(options.parentID).append(datetimepicker);
$(options.parentID)
.append(datetimepicker);
var _xdsoft_datetime = new function() {
var _this = this;
@ -819,6 +832,8 @@
_this.currentTime.setFullYear(_this.currentTime.getFullYear()+1);
month = 0;
}
var year = _this.currentTime.getFullYear();
_this.currentTime.setDate(
Math.min(
// Day 0 is the last day in the previous month, but we want to know the number of days in the current month, so we need to evaluate the subsequent month (month+1)
@ -828,6 +843,11 @@
);
_this.currentTime.setMonth(month);
options.onChangeMonth&&options.onChangeMonth.call&&options.onChangeMonth.call(datetimepicker,_xdsoft_datetime.currentTime,datetimepicker.data('input'));
if( year!=_this.currentTime.getFullYear() && $.isFunction(options.onChangeYear) ){
options.onChangeYear.call(datetimepicker,_xdsoft_datetime.currentTime,datetimepicker.data('input'));
}
datetimepicker.trigger('xchange.xdsoft');
return month;
};
@ -851,6 +871,11 @@
return month;
};
_this.getWeekOfYear = function( datetime ) {
var onejan = new Date( datetime.getFullYear(),0,1 );
return Math.ceil((((datetime - onejan) / 86400000) + onejan.getDay()+1)/7);
};
_this.strToDateTime = function( sDateTime ) {
if( sDateTime && sDateTime instanceof Date && _this.isValidDate(sDateTime) )
return sDateTime;
@ -884,7 +909,7 @@
if( sTime && sTime instanceof Date && _this.isValidDate(sTime) )
return sTime;
var currentTime = sTime?Date.parseDate(sTime, options.formatTime):_this.now();
var currentTime = sTime?Date.parseDate(sTime, options.formatTime):_this.now(true);
if( !_this.isValidDate(currentTime) )
currentTime = _this.now(true);
@ -1007,7 +1032,10 @@
classes = [];
i++;
d = start.getDate(); y = start.getFullYear(); m = start.getMonth(); w = start.getWeekOfYear();
d = start.getDate();
y = start.getFullYear();
m = start.getMonth();
w = _xdsoft_datetime.getWeekOfYear(start);
classes.push('xdsoft_date');
@ -1271,8 +1299,7 @@
triggerAfterOpen = false;
}
})
.on( 'click.xdsoft', function( xdevent )
{
.on( 'click.xdsoft', function( xdevent ) {
xdevent.stopPropagation(); // Prevents closing of Pop-ups, Modals and Flyouts in Bootstrap
});
@ -1336,6 +1363,12 @@
})
.on('close.xdsoft', function( event ) {
var onClose = true;
mounth_picker
.find('.xdsoft_month,.xdsoft_year')
.find('.xdsoft_select')
.hide();
if( options.onClose&&options.onClose.call ) {
onClose=options.onClose.call(datetimepicker,_xdsoft_datetime.currentTime,datetimepicker.data('input'));
}
@ -1364,6 +1397,11 @@
ct = _xdsoft_datetime.strToDateTime(ct);
} else if ( options.defaultDate ) {
ct = _xdsoft_datetime.strToDate(options.defaultDate);
if( options.defaultTime ){
var time = _xdsoft_datetime.strtotime(options.defaultTime);
ct.setHours( time.getHours() );
ct.setMinutes( time.getMinutes() );
}
}
}