xdan-datetimepicker-rails 2.3.2 → 2.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a580c55989409917378a5edee862b4ac4b13a3f7
|
4
|
+
data.tar.gz: 5532517f4eaecc3f8a9bb39a9dd302b9bb4b7ffa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e9c30ee672f2781ba7f9fd95a1a96dab546a6ff77cbdddd9c329c2df6d304cc42f0ff8506da5a288392f301566604e4c59e51bfbeffec65ad1fd27ea9820ab5
|
7
|
+
data.tar.gz: b59fc35bafa5a131f1130f9a438030334da0087cad1aa91cff892c81577b9e8425790c6863f9fb4dc111e4092096e6a25d0514e56ab1f03adcd7c59c71fdf686
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @preserve jQuery DateTimePicker plugin v2.3.
|
2
|
+
* @preserve jQuery DateTimePicker plugin v2.3.3
|
3
3
|
* @homepage http://xdsoft.net/jqplugins/datetimepicker/
|
4
4
|
* (c) 2014, Chupurnov Valeriy.
|
5
5
|
*/
|
@@ -31,6 +31,14 @@
|
|
31
31
|
"Вск", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"
|
32
32
|
]
|
33
33
|
},
|
34
|
+
uk:{ // Ukrainian
|
35
|
+
months:[
|
36
|
+
'Січень','Лютий','Березень','Квітень','Травень','Червень','Липень','Серпень','Вересень','Жовтень','Листопад','Грудень'
|
37
|
+
],
|
38
|
+
dayOfWeek:[
|
39
|
+
"Ндл", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Сбт"
|
40
|
+
]
|
41
|
+
},
|
34
42
|
en:{ // English
|
35
43
|
months: [
|
36
44
|
"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
|
@@ -217,6 +225,7 @@
|
|
217
225
|
|
218
226
|
timepicker:true,
|
219
227
|
datepicker:true,
|
228
|
+
weeks:false,
|
220
229
|
|
221
230
|
defaultTime:false, // use formatTime format (ex. '10:00' for formatTime: 'H:i')
|
222
231
|
defaultDate:false, // use formatDate format (ex new Date() or '1986/12/08' or '-1970/01/05' or '-1970/01/05')
|
@@ -440,7 +449,7 @@
|
|
440
449
|
|
441
450
|
createDateTimePicker = function( input ) {
|
442
451
|
|
443
|
-
var datetimepicker = $('<div '+(options.id?'id="'+options.id+'"':'')+' '+(options.style?'style="'+options.style+'"':'')+' class="xdsoft_datetimepicker xdsoft_noselect '+options.className+'"></div>'),
|
452
|
+
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>'),
|
444
453
|
xdsoft_copyright = $('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),
|
445
454
|
datepicker = $('<div class="xdsoft_datepicker active"></div>'),
|
446
455
|
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>'),
|
@@ -939,13 +948,17 @@
|
|
939
948
|
//generate calendar
|
940
949
|
table+='<table><thead><tr>';
|
941
950
|
|
951
|
+
if(options.weeks) {
|
952
|
+
table+='<th></th>';
|
953
|
+
}
|
954
|
+
|
942
955
|
// days
|
943
956
|
for(var j = 0; j<7; j++) {
|
944
957
|
table+='<th>'+options.i18n[options.lang].dayOfWeek[(j+options.dayOfWeekStart)>6?0:j+options.dayOfWeekStart]+'</th>';
|
945
958
|
}
|
946
959
|
|
947
960
|
table+='</tr></thead>';
|
948
|
-
table+='<tbody
|
961
|
+
table+='<tbody>';
|
949
962
|
var maxDate = false, minDate = false;
|
950
963
|
|
951
964
|
if( options.maxDate!==false ) {
|
@@ -958,13 +971,13 @@
|
|
958
971
|
minDate = new Date(minDate.getFullYear(),minDate.getMonth(),minDate.getDate());
|
959
972
|
}
|
960
973
|
|
961
|
-
var d,y,m,classes = [],customDateSettings;
|
974
|
+
var d,y,m,w,classes = [],customDateSettings,newRow=true;
|
962
975
|
|
963
976
|
while( i<_xdsoft_datetime.currentTime.countDaysInMonth()||start.getDay()!=options.dayOfWeekStart||_xdsoft_datetime.currentTime.getMonth()==start.getMonth() ) {
|
964
977
|
classes = [];
|
965
978
|
i++;
|
966
979
|
|
967
|
-
d = start.getDate(); y = start.getFullYear(); m = start.getMonth();
|
980
|
+
d = start.getDate(); y = start.getFullYear(); m = start.getMonth(); w = start.getWeekOfYear();
|
968
981
|
|
969
982
|
classes.push('xdsoft_date');
|
970
983
|
|
@@ -1000,12 +1013,22 @@
|
|
1000
1013
|
classes.push(options.beforeShowDay(start))
|
1001
1014
|
}
|
1002
1015
|
|
1016
|
+
if(newRow) {
|
1017
|
+
table+='<tr>';
|
1018
|
+
newRow = false;
|
1019
|
+
|
1020
|
+
if(options.weeks) {
|
1021
|
+
table+='<th>'+w+'</th>';
|
1022
|
+
}
|
1023
|
+
}
|
1024
|
+
|
1003
1025
|
table+='<td data-date="'+d+'" data-month="'+m+'" data-year="'+y+'"'+' class="xdsoft_date xdsoft_day_of_week'+start.getDay()+' '+ classes.join(' ')+'">'+
|
1004
1026
|
'<div>'+d+'</div>'+
|
1005
1027
|
'</td>';
|
1006
1028
|
|
1007
1029
|
if( start.getDay()==options.dayOfWeekStartPrev ) {
|
1008
1030
|
table+='</tr>';
|
1031
|
+
newRow = true;
|
1009
1032
|
}
|
1010
1033
|
|
1011
1034
|
start.setDate(d+1);
|
@@ -64,6 +64,9 @@
|
|
64
64
|
float:left;
|
65
65
|
margin-left:8px;
|
66
66
|
}
|
67
|
+
.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_datepicker{
|
68
|
+
width: 256px;
|
69
|
+
}
|
67
70
|
.xdsoft_datetimepicker .xdsoft_timepicker{
|
68
71
|
width: 58px;
|
69
72
|
float:left;
|
@@ -233,6 +236,9 @@
|
|
233
236
|
cursor:pointer;
|
234
237
|
height: 25px;
|
235
238
|
}
|
239
|
+
.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar td,.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar th{
|
240
|
+
width:12.5%;
|
241
|
+
}
|
236
242
|
.xdsoft_datetimepicker .xdsoft_calendar th{
|
237
243
|
background: #F1F1F1;
|
238
244
|
}
|