bootstrap-datepicker-rails 1.3.1.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -0
- data/Rakefile +13 -5
- data/lib/bootstrap-datepicker-rails/version.rb +1 -1
- data/vendor/assets/javascripts/bootstrap-datepicker/core.js +240 -139
- data/vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.fr.js +5 -5
- data/vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.kh.js +9 -9
- data/vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.me.js +17 -0
- data/vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.nl-BE.js +5 -5
- data/vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.nl.js +5 -5
- data/vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.tr.js +2 -0
- data/vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.uk.js +2 -0
- data/vendor/assets/stylesheets/bootstrap-datepicker.css +14 -51
- data/vendor/assets/stylesheets/bootstrap-datepicker3.css +11 -45
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12275b3675337b334e802880958e6feed1c83d69
|
4
|
+
data.tar.gz: 2e857161bcceda4eadcff09b70d4bafc5310bba6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84753fc92289d03b14ed3cfaf1f525a634eb6d5a46590493cabdd4ac5a93756e47a1df0478a158ea35d342d6d162a170ac4e3f0af89a93c9a847ece3a2e96088
|
7
|
+
data.tar.gz: 32f8bca100026f3e6f283be25e3ec2de9a5583a7ad65ce5d703e5540d4460606e24d749d6c4193c22bcf32553ec80cefeb0283f9fd2777d3f7d02b1ae4c7e57d
|
data/README.md
CHANGED
@@ -76,6 +76,17 @@ http://eternicode.github.io/bootstrap-datepicker/
|
|
76
76
|
|
77
77
|
There are a lot of options you can pass to datepicker(). They are documented at [https://github.com/eternicode/bootstrap-datepicker](https://github.com/eternicode/bootstrap-datepicker)
|
78
78
|
|
79
|
+
## Updating the assets
|
80
|
+
|
81
|
+
Please use the rake task to update the assets.
|
82
|
+
|
83
|
+
Examples :
|
84
|
+
|
85
|
+
```bash
|
86
|
+
rake update # Update the assets with the latest tag source code on master
|
87
|
+
rake update v1.4.0 # Update the assets with the specified tag source code
|
88
|
+
```
|
89
|
+
|
79
90
|
## Questions? Bugs?
|
80
91
|
|
81
92
|
Use Github Issues.
|
data/Rakefile
CHANGED
@@ -5,15 +5,23 @@ require File.expand_path('../lib/bootstrap-datepicker-rails/version', __FILE__)
|
|
5
5
|
|
6
6
|
desc "Update assets"
|
7
7
|
task :update do
|
8
|
+
if ARGV.count > 1
|
9
|
+
checkout_branch = "tags/#{ARGV.last}"
|
10
|
+
task ARGV.last.to_sym {}
|
11
|
+
else
|
12
|
+
checkout_branch = "`git describe --abbrev=0`"
|
13
|
+
end
|
14
|
+
|
8
15
|
if Dir.exist?('bootstrap-datepicker-src')
|
9
|
-
system("cd bootstrap-datepicker-src && git checkout
|
16
|
+
system("cd bootstrap-datepicker-src && git checkout master && git pull && git checkout #{checkout_branch}")
|
10
17
|
else
|
11
18
|
system("git clone git://github.com/eternicode/bootstrap-datepicker.git bootstrap-datepicker-src")
|
12
|
-
system("cd bootstrap-datepicker-src && git checkout
|
19
|
+
system("cd bootstrap-datepicker-src && git checkout #{checkout_branch}")
|
13
20
|
end
|
14
|
-
|
15
|
-
system("cp bootstrap-datepicker-src/css/
|
16
|
-
system("cp bootstrap-datepicker-src/
|
21
|
+
|
22
|
+
system("cp bootstrap-datepicker-src/dist/css/bootstrap-datepicker.css vendor/assets/stylesheets/bootstrap-datepicker.css")
|
23
|
+
system("cp bootstrap-datepicker-src/dist/css/bootstrap-datepicker3.css vendor/assets/stylesheets/bootstrap-datepicker3.css")
|
24
|
+
system("cp bootstrap-datepicker-src/dist/js/bootstrap-datepicker.js vendor/assets/javascripts/bootstrap-datepicker/core.js")
|
17
25
|
system("cp bootstrap-datepicker-src/js/locales/*.js vendor/assets/javascripts/bootstrap-datepicker/locales/")
|
18
26
|
system("git status")
|
19
27
|
|
@@ -1,28 +1,10 @@
|
|
1
|
-
|
2
|
-
* bootstrap-datepicker
|
3
|
-
* Repo: https://github.com/eternicode/bootstrap-datepicker/
|
4
|
-
* Demo: http://eternicode.github.io/bootstrap-datepicker/
|
5
|
-
* Docs: http://bootstrap-datepicker.readthedocs.org/
|
6
|
-
* Forked from http://www.eyecon.ro/bootstrap-datepicker
|
7
|
-
* =========================================================
|
8
|
-
* Started by Stefan Petre; improvements by Andrew Rowls + contributors
|
1
|
+
/*!
|
2
|
+
* Datepicker for Bootstrap v1.4.0 (https://github.com/eternicode/bootstrap-datepicker)
|
9
3
|
*
|
10
|
-
*
|
11
|
-
*
|
12
|
-
*
|
13
|
-
|
14
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
15
|
-
*
|
16
|
-
* Unless required by applicable law or agreed to in writing, software
|
17
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
-
* See the License for the specific language governing permissions and
|
20
|
-
* limitations under the License.
|
21
|
-
* ========================================================= */
|
22
|
-
|
23
|
-
(function($, undefined){
|
24
|
-
|
25
|
-
var $window = $(window);
|
4
|
+
* Copyright 2012 Stefan Petre
|
5
|
+
* Improvements by Andrew Rowls
|
6
|
+
* Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0)
|
7
|
+
*/(function($, undefined){
|
26
8
|
|
27
9
|
function UTCDate(){
|
28
10
|
return new Date(Date.UTC.apply(Date, arguments));
|
@@ -31,6 +13,13 @@
|
|
31
13
|
var today = new Date();
|
32
14
|
return UTCDate(today.getFullYear(), today.getMonth(), today.getDate());
|
33
15
|
}
|
16
|
+
function isUTCEquals(date1, date2) {
|
17
|
+
return (
|
18
|
+
date1.getUTCFullYear() === date2.getUTCFullYear() &&
|
19
|
+
date1.getUTCMonth() === date2.getUTCMonth() &&
|
20
|
+
date1.getUTCDate() === date2.getUTCDate()
|
21
|
+
);
|
22
|
+
}
|
34
23
|
function alias(method){
|
35
24
|
return function(){
|
36
25
|
return this[method].apply(this, arguments);
|
@@ -84,16 +73,16 @@
|
|
84
73
|
// Picker object
|
85
74
|
|
86
75
|
var Datepicker = function(element, options){
|
76
|
+
this._process_options(options);
|
77
|
+
|
87
78
|
this.dates = new DateArray();
|
88
|
-
this.viewDate =
|
79
|
+
this.viewDate = this.o.defaultViewDate;
|
89
80
|
this.focusDate = null;
|
90
81
|
|
91
|
-
this._process_options(options);
|
92
|
-
|
93
82
|
this.element = $(element);
|
94
83
|
this.isInline = false;
|
95
84
|
this.isInput = this.element.is('input');
|
96
|
-
this.component = this.element.
|
85
|
+
this.component = this.element.hasClass('date') ? this.element.find('.add-on, .input-group-addon, .btn') : false;
|
97
86
|
this.hasInput = this.component && this.element.find('input').length;
|
98
87
|
if (this.component && this.component.length === 0)
|
99
88
|
this.component = false;
|
@@ -116,7 +105,7 @@
|
|
116
105
|
this.viewMode = this.o.startView;
|
117
106
|
|
118
107
|
if (this.o.calendarWeeks)
|
119
|
-
this.picker.find('tfoot
|
108
|
+
this.picker.find('tfoot .today, tfoot .clear')
|
120
109
|
.attr('colspan', function(i, val){
|
121
110
|
return parseInt(val) + 1;
|
122
111
|
});
|
@@ -126,6 +115,7 @@
|
|
126
115
|
this.setStartDate(this._o.startDate);
|
127
116
|
this.setEndDate(this._o.endDate);
|
128
117
|
this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled);
|
118
|
+
this.setDatesDisabled(this.o.datesDisabled);
|
129
119
|
|
130
120
|
this.fillDow();
|
131
121
|
this.fillMonths();
|
@@ -192,8 +182,6 @@
|
|
192
182
|
o.multidate = Number(o.multidate) || false;
|
193
183
|
if (o.multidate !== false)
|
194
184
|
o.multidate = Math.max(0, o.multidate);
|
195
|
-
else
|
196
|
-
o.multidate = 1;
|
197
185
|
}
|
198
186
|
o.multidateSeparator = String(o.multidateSeparator);
|
199
187
|
|
@@ -231,10 +219,20 @@
|
|
231
219
|
return parseInt(d, 10);
|
232
220
|
});
|
233
221
|
|
222
|
+
o.datesDisabled = o.datesDisabled||[];
|
223
|
+
if (!$.isArray(o.datesDisabled)) {
|
224
|
+
var datesDisabled = [];
|
225
|
+
datesDisabled.push(DPGlobal.parseDate(o.datesDisabled, format, o.language));
|
226
|
+
o.datesDisabled = datesDisabled;
|
227
|
+
}
|
228
|
+
o.datesDisabled = $.map(o.datesDisabled,function(d){
|
229
|
+
return DPGlobal.parseDate(d, format, o.language);
|
230
|
+
});
|
231
|
+
|
234
232
|
var plc = String(o.orientation).toLowerCase().split(/\s+/g),
|
235
233
|
_plc = o.orientation.toLowerCase();
|
236
234
|
plc = $.grep(plc, function(word){
|
237
|
-
return
|
235
|
+
return /^auto|left|right|top|bottom$/.test(word);
|
238
236
|
});
|
239
237
|
o.orientation = {x: 'auto', y: 'auto'};
|
240
238
|
if (!_plc || _plc === 'auto')
|
@@ -253,15 +251,24 @@
|
|
253
251
|
}
|
254
252
|
else {
|
255
253
|
_plc = $.grep(plc, function(word){
|
256
|
-
return
|
254
|
+
return /^left|right$/.test(word);
|
257
255
|
});
|
258
256
|
o.orientation.x = _plc[0] || 'auto';
|
259
257
|
|
260
258
|
_plc = $.grep(plc, function(word){
|
261
|
-
return
|
259
|
+
return /^top|bottom$/.test(word);
|
262
260
|
});
|
263
261
|
o.orientation.y = _plc[0] || 'auto';
|
264
262
|
}
|
263
|
+
if (o.defaultViewDate) {
|
264
|
+
var year = o.defaultViewDate.year || new Date().getFullYear();
|
265
|
+
var month = o.defaultViewDate.month || 0;
|
266
|
+
var day = o.defaultViewDate.day || 1;
|
267
|
+
o.defaultViewDate = UTCDate(year, month, day);
|
268
|
+
} else {
|
269
|
+
o.defaultViewDate = UTCToday();
|
270
|
+
}
|
271
|
+
o.showOnFocus = o.showOnFocus !== undefined ? o.showOnFocus : true;
|
265
272
|
},
|
266
273
|
_events: [],
|
267
274
|
_secondaryEvents: [],
|
@@ -294,34 +301,32 @@
|
|
294
301
|
}
|
295
302
|
},
|
296
303
|
_buildEvents: function(){
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
];
|
324
|
-
}
|
304
|
+
var events = {
|
305
|
+
keyup: $.proxy(function(e){
|
306
|
+
if ($.inArray(e.keyCode, [27, 37, 39, 38, 40, 32, 13, 9]) === -1)
|
307
|
+
this.update();
|
308
|
+
}, this),
|
309
|
+
keydown: $.proxy(this.keydown, this)
|
310
|
+
};
|
311
|
+
|
312
|
+
if (this.o.showOnFocus === true) {
|
313
|
+
events.focus = $.proxy(this.show, this);
|
314
|
+
}
|
315
|
+
|
316
|
+
if (this.isInput) { // single input
|
317
|
+
this._events = [
|
318
|
+
[this.element, events]
|
319
|
+
];
|
320
|
+
}
|
321
|
+
else if (this.component && this.hasInput) { // component: input + button
|
322
|
+
this._events = [
|
323
|
+
// For components that are not readonly, allow keyboard nav
|
324
|
+
[this.element.find('input'), events],
|
325
|
+
[this.component, {
|
326
|
+
click: $.proxy(this.show, this)
|
327
|
+
}]
|
328
|
+
];
|
329
|
+
}
|
325
330
|
else if (this.element.is('div')){ // inline datepicker
|
326
331
|
this.isInline = true;
|
327
332
|
}
|
@@ -408,19 +413,25 @@
|
|
408
413
|
},
|
409
414
|
|
410
415
|
show: function(){
|
416
|
+
if (this.element.attr('readonly') && this.o.enableOnReadonly === false)
|
417
|
+
return;
|
411
418
|
if (!this.isInline)
|
412
|
-
this.picker.appendTo(
|
413
|
-
this.picker.show();
|
419
|
+
this.picker.appendTo(this.o.container);
|
414
420
|
this.place();
|
421
|
+
this.picker.show();
|
415
422
|
this._attachSecondaryEvents();
|
416
423
|
this._trigger('show');
|
424
|
+
if ((window.navigator.msMaxTouchPoints || 'ontouchstart' in document) && this.o.disableTouchKeyboard) {
|
425
|
+
$(this.element).blur();
|
426
|
+
}
|
427
|
+
return this;
|
417
428
|
},
|
418
429
|
|
419
430
|
hide: function(){
|
420
431
|
if (this.isInline)
|
421
|
-
return;
|
432
|
+
return this;
|
422
433
|
if (!this.picker.is(':visible'))
|
423
|
-
return;
|
434
|
+
return this;
|
424
435
|
this.focusDate = null;
|
425
436
|
this.picker.hide().detach();
|
426
437
|
this._detachSecondaryEvents();
|
@@ -436,6 +447,7 @@
|
|
436
447
|
)
|
437
448
|
this.setValue();
|
438
449
|
this._trigger('hide');
|
450
|
+
return this;
|
439
451
|
},
|
440
452
|
|
441
453
|
remove: function(){
|
@@ -447,6 +459,7 @@
|
|
447
459
|
if (!this.isInput){
|
448
460
|
delete this.element.data().date;
|
449
461
|
}
|
462
|
+
return this;
|
450
463
|
},
|
451
464
|
|
452
465
|
_utc_to_local: function(utc){
|
@@ -477,14 +490,39 @@
|
|
477
490
|
},
|
478
491
|
|
479
492
|
getUTCDate: function(){
|
480
|
-
|
493
|
+
var selected_date = this.dates.get(-1);
|
494
|
+
if (typeof selected_date !== 'undefined') {
|
495
|
+
return new Date(selected_date);
|
496
|
+
} else {
|
497
|
+
return null;
|
498
|
+
}
|
481
499
|
},
|
482
500
|
|
501
|
+
clearDates: function(){
|
502
|
+
var element;
|
503
|
+
if (this.isInput) {
|
504
|
+
element = this.element;
|
505
|
+
} else if (this.component) {
|
506
|
+
element = this.element.find('input');
|
507
|
+
}
|
508
|
+
|
509
|
+
if (element) {
|
510
|
+
element.val('').change();
|
511
|
+
}
|
512
|
+
|
513
|
+
this.update();
|
514
|
+
this._trigger('changeDate');
|
515
|
+
|
516
|
+
if (this.o.autoclose) {
|
517
|
+
this.hide();
|
518
|
+
}
|
519
|
+
},
|
483
520
|
setDates: function(){
|
484
521
|
var args = $.isArray(arguments[0]) ? arguments[0] : arguments;
|
485
522
|
this.update.apply(this, args);
|
486
523
|
this._trigger('changeDate');
|
487
524
|
this.setValue();
|
525
|
+
return this;
|
488
526
|
},
|
489
527
|
|
490
528
|
setUTCDates: function(){
|
@@ -492,6 +530,7 @@
|
|
492
530
|
this.update.apply(this, $.map(args, this._utc_to_local));
|
493
531
|
this._trigger('changeDate');
|
494
532
|
this.setValue();
|
533
|
+
return this;
|
495
534
|
},
|
496
535
|
|
497
536
|
setDate: alias('setDates'),
|
@@ -507,6 +546,7 @@
|
|
507
546
|
else {
|
508
547
|
this.element.val(formatted).change();
|
509
548
|
}
|
549
|
+
return this;
|
510
550
|
},
|
511
551
|
|
512
552
|
getFormattedDate: function(format){
|
@@ -523,41 +563,51 @@
|
|
523
563
|
this._process_options({startDate: startDate});
|
524
564
|
this.update();
|
525
565
|
this.updateNavArrows();
|
566
|
+
return this;
|
526
567
|
},
|
527
568
|
|
528
569
|
setEndDate: function(endDate){
|
529
570
|
this._process_options({endDate: endDate});
|
530
571
|
this.update();
|
531
572
|
this.updateNavArrows();
|
573
|
+
return this;
|
532
574
|
},
|
533
575
|
|
534
576
|
setDaysOfWeekDisabled: function(daysOfWeekDisabled){
|
535
577
|
this._process_options({daysOfWeekDisabled: daysOfWeekDisabled});
|
536
578
|
this.update();
|
537
579
|
this.updateNavArrows();
|
580
|
+
return this;
|
581
|
+
},
|
582
|
+
|
583
|
+
setDatesDisabled: function(datesDisabled){
|
584
|
+
this._process_options({datesDisabled: datesDisabled});
|
585
|
+
this.update();
|
586
|
+
this.updateNavArrows();
|
538
587
|
},
|
539
588
|
|
540
589
|
place: function(){
|
541
590
|
if (this.isInline)
|
542
|
-
return;
|
591
|
+
return this;
|
543
592
|
var calendarWidth = this.picker.outerWidth(),
|
544
593
|
calendarHeight = this.picker.outerHeight(),
|
545
594
|
visualPadding = 10,
|
546
|
-
windowWidth = $
|
547
|
-
windowHeight = $
|
548
|
-
scrollTop = $
|
595
|
+
windowWidth = $(this.o.container).width(),
|
596
|
+
windowHeight = $(this.o.container).height(),
|
597
|
+
scrollTop = $(this.o.container).scrollTop(),
|
598
|
+
appendOffset = $(this.o.container).offset();
|
549
599
|
|
550
600
|
var parentsZindex = [];
|
551
|
-
this.element.parents().each(function()
|
601
|
+
this.element.parents().each(function(){
|
552
602
|
var itemZIndex = $(this).css('z-index');
|
553
|
-
if (
|
603
|
+
if (itemZIndex !== 'auto' && itemZIndex !== 0) parentsZindex.push(parseInt(itemZIndex));
|
554
604
|
});
|
555
|
-
var zIndex = Math.max.apply(
|
605
|
+
var zIndex = Math.max.apply(Math, parentsZindex) + 10;
|
556
606
|
var offset = this.component ? this.component.parent().offset() : this.element.offset();
|
557
607
|
var height = this.component ? this.component.outerHeight(true) : this.element.outerHeight(false);
|
558
608
|
var width = this.component ? this.component.outerWidth(true) : this.element.outerWidth(false);
|
559
|
-
var left = offset.left,
|
560
|
-
top = offset.top;
|
609
|
+
var left = offset.left - appendOffset.left,
|
610
|
+
top = offset.top - appendOffset.top;
|
561
611
|
|
562
612
|
this.picker.removeClass(
|
563
613
|
'datepicker-orient-top datepicker-orient-bottom '+
|
@@ -572,12 +622,18 @@
|
|
572
622
|
// auto x orientation is best-placement: if it crosses a window
|
573
623
|
// edge, fudge it sideways
|
574
624
|
else {
|
575
|
-
|
576
|
-
|
577
|
-
|
625
|
+
if (offset.left < 0) {
|
626
|
+
// component is outside the window on the left side. Move it into visible range
|
627
|
+
this.picker.addClass('datepicker-orient-left');
|
578
628
|
left -= offset.left - visualPadding;
|
579
|
-
else if (
|
580
|
-
|
629
|
+
} else if (left + calendarWidth > windowWidth) {
|
630
|
+
// the calendar passes the widow right edge. Align it to component right side
|
631
|
+
this.picker.addClass('datepicker-orient-right');
|
632
|
+
left = offset.left + width - calendarWidth;
|
633
|
+
} else {
|
634
|
+
// Default to left
|
635
|
+
this.picker.addClass('datepicker-orient-left');
|
636
|
+
}
|
581
637
|
}
|
582
638
|
|
583
639
|
// auto y orientation is best-situation: top or bottom, no fudging,
|
@@ -585,8 +641,8 @@
|
|
585
641
|
var yorient = this.o.orientation.y,
|
586
642
|
top_overflow, bottom_overflow;
|
587
643
|
if (yorient === 'auto'){
|
588
|
-
top_overflow = -scrollTop +
|
589
|
-
bottom_overflow = scrollTop + windowHeight - (
|
644
|
+
top_overflow = -scrollTop + top - calendarHeight;
|
645
|
+
bottom_overflow = scrollTop + windowHeight - (top + height + calendarHeight);
|
590
646
|
if (Math.max(top_overflow, bottom_overflow) === bottom_overflow)
|
591
647
|
yorient = 'top';
|
592
648
|
else
|
@@ -598,17 +654,27 @@
|
|
598
654
|
else
|
599
655
|
top -= calendarHeight + parseInt(this.picker.css('padding-top'));
|
600
656
|
|
601
|
-
this.
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
657
|
+
if (this.o.rtl) {
|
658
|
+
var right = windowWidth - (left + width);
|
659
|
+
this.picker.css({
|
660
|
+
top: top,
|
661
|
+
right: right,
|
662
|
+
zIndex: zIndex
|
663
|
+
});
|
664
|
+
} else {
|
665
|
+
this.picker.css({
|
666
|
+
top: top,
|
667
|
+
left: left,
|
668
|
+
zIndex: zIndex
|
669
|
+
});
|
670
|
+
}
|
671
|
+
return this;
|
606
672
|
},
|
607
673
|
|
608
674
|
_allow_update: true,
|
609
675
|
update: function(){
|
610
676
|
if (!this._allow_update)
|
611
|
-
return;
|
677
|
+
return this;
|
612
678
|
|
613
679
|
var oldDates = this.dates.copy(),
|
614
680
|
dates = [],
|
@@ -664,15 +730,19 @@
|
|
664
730
|
this._trigger('clearDate');
|
665
731
|
|
666
732
|
this.fill();
|
733
|
+
return this;
|
667
734
|
},
|
668
735
|
|
669
736
|
fillDow: function(){
|
670
737
|
var dowCnt = this.o.weekStart,
|
671
738
|
html = '<tr>';
|
672
739
|
if (this.o.calendarWeeks){
|
673
|
-
|
740
|
+
this.picker.find('.datepicker-days thead tr:first-child .datepicker-switch')
|
741
|
+
.attr('colspan', function(i, val){
|
742
|
+
return parseInt(val) + 1;
|
743
|
+
});
|
744
|
+
var cell = '<th class="cw"> </th>';
|
674
745
|
html += cell;
|
675
|
-
this.picker.find('.datepicker-days thead tr:first-child').prepend(cell);
|
676
746
|
}
|
677
747
|
while (dowCnt < this.o.weekStart + 7){
|
678
748
|
html += '<th class="dow">'+dates[this.o.language].daysMin[(dowCnt++)%7]+'</th>';
|
@@ -726,6 +796,12 @@
|
|
726
796
|
$.inArray(date.getUTCDay(), this.o.daysOfWeekDisabled) !== -1){
|
727
797
|
cls.push('disabled');
|
728
798
|
}
|
799
|
+
if (this.o.datesDisabled.length > 0 &&
|
800
|
+
$.grep(this.o.datesDisabled, function(d){
|
801
|
+
return isUTCEquals(date, d); }).length > 0) {
|
802
|
+
cls.push('disabled', 'disabled-date');
|
803
|
+
}
|
804
|
+
|
729
805
|
if (this.range){
|
730
806
|
if (date > this.range[0] && date < this.range[this.range.length-1]){
|
731
807
|
cls.push('range');
|
@@ -748,13 +824,14 @@
|
|
748
824
|
todaytxt = dates[this.o.language].today || dates['en'].today || '',
|
749
825
|
cleartxt = dates[this.o.language].clear || dates['en'].clear || '',
|
750
826
|
tooltip;
|
751
|
-
if (isNaN(year) || isNaN(month))
|
752
|
-
|
827
|
+
if (isNaN(year) || isNaN(month))
|
828
|
+
return;
|
829
|
+
this.picker.find('.datepicker-days thead .datepicker-switch')
|
753
830
|
.text(dates[this.o.language].months[month]+' '+year);
|
754
|
-
this.picker.find('tfoot
|
831
|
+
this.picker.find('tfoot .today')
|
755
832
|
.text(todaytxt)
|
756
833
|
.toggle(this.o.todayBtn !== false);
|
757
|
-
this.picker.find('tfoot
|
834
|
+
this.picker.find('tfoot .clear')
|
758
835
|
.text(cleartxt)
|
759
836
|
.toggle(this.o.clearBtn !== false);
|
760
837
|
this.updateNavArrows();
|
@@ -837,6 +914,18 @@
|
|
837
914
|
months.slice(endMonth+1).addClass('disabled');
|
838
915
|
}
|
839
916
|
|
917
|
+
if (this.o.beforeShowMonth !== $.noop){
|
918
|
+
var that = this;
|
919
|
+
$.each(months, function(i, month){
|
920
|
+
if (!$(month).hasClass('disabled')) {
|
921
|
+
var moDate = new Date(year, i, 1);
|
922
|
+
var before = that.o.beforeShowMonth(moDate);
|
923
|
+
if (before === false)
|
924
|
+
$(month).addClass('disabled');
|
925
|
+
}
|
926
|
+
});
|
927
|
+
}
|
928
|
+
|
840
929
|
html = '';
|
841
930
|
year = parseInt(year/10, 10) * 10;
|
842
931
|
var yearCont = this.picker.find('.datepicker-years')
|
@@ -859,7 +948,7 @@
|
|
859
948
|
classes.push('active');
|
860
949
|
if (year < startYear || year > endYear)
|
861
950
|
classes.push('disabled');
|
862
|
-
html += '<span class="' + classes.join(' ') + '">'+year+'</span>';
|
951
|
+
html += '<span class="' + classes.join(' ') + '">' + year + '</span>';
|
863
952
|
year += 1;
|
864
953
|
}
|
865
954
|
yearCont.html(html);
|
@@ -942,24 +1031,14 @@
|
|
942
1031
|
this._setDate(date, which);
|
943
1032
|
break;
|
944
1033
|
case 'clear':
|
945
|
-
|
946
|
-
if (this.isInput)
|
947
|
-
element = this.element;
|
948
|
-
else if (this.component)
|
949
|
-
element = this.element.find('input');
|
950
|
-
if (element)
|
951
|
-
element.val("").change();
|
952
|
-
this.update();
|
953
|
-
this._trigger('changeDate');
|
954
|
-
if (this.o.autoclose)
|
955
|
-
this.hide();
|
1034
|
+
this.clearDates();
|
956
1035
|
break;
|
957
1036
|
}
|
958
1037
|
break;
|
959
1038
|
case 'span':
|
960
|
-
if (!target.
|
1039
|
+
if (!target.hasClass('disabled')){
|
961
1040
|
this.viewDate.setUTCDate(1);
|
962
|
-
if (target.
|
1041
|
+
if (target.hasClass('month')){
|
963
1042
|
day = 1;
|
964
1043
|
month = target.parent().find('span').index(target);
|
965
1044
|
year = this.viewDate.getUTCFullYear();
|
@@ -984,11 +1063,11 @@
|
|
984
1063
|
}
|
985
1064
|
break;
|
986
1065
|
case 'td':
|
987
|
-
if (target.
|
1066
|
+
if (target.hasClass('day') && !target.hasClass('disabled')){
|
988
1067
|
day = parseInt(target.text(), 10)||1;
|
989
1068
|
year = this.viewDate.getUTCFullYear();
|
990
1069
|
month = this.viewDate.getUTCMonth();
|
991
|
-
if (target.
|
1070
|
+
if (target.hasClass('old')){
|
992
1071
|
if (month === 0){
|
993
1072
|
month = 11;
|
994
1073
|
year -= 1;
|
@@ -997,7 +1076,7 @@
|
|
997
1076
|
month -= 1;
|
998
1077
|
}
|
999
1078
|
}
|
1000
|
-
else if (target.
|
1079
|
+
else if (target.hasClass('new')){
|
1001
1080
|
if (month === 11){
|
1002
1081
|
month = 0;
|
1003
1082
|
year += 1;
|
@@ -1022,15 +1101,19 @@
|
|
1022
1101
|
if (!date){
|
1023
1102
|
this.dates.clear();
|
1024
1103
|
}
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1104
|
+
|
1105
|
+
if (ix !== -1){
|
1106
|
+
if (this.o.multidate === true || this.o.multidate > 1 || this.o.toggleActive){
|
1107
|
+
this.dates.remove(ix);
|
1108
|
+
}
|
1109
|
+
} else if (this.o.multidate === false) {
|
1110
|
+
this.dates.clear();
|
1111
|
+
this.dates.push(date);
|
1030
1112
|
}
|
1031
1113
|
else {
|
1032
1114
|
this.dates.push(date);
|
1033
1115
|
}
|
1116
|
+
|
1034
1117
|
if (typeof this.o.multidate === 'number')
|
1035
1118
|
while (this.dates.length > this.o.multidate)
|
1036
1119
|
this.dates.remove(0);
|
@@ -1044,7 +1127,9 @@
|
|
1044
1127
|
|
1045
1128
|
this.fill();
|
1046
1129
|
this.setValue();
|
1047
|
-
|
1130
|
+
if (!which || which !== 'view') {
|
1131
|
+
this._trigger('changeDate');
|
1132
|
+
}
|
1048
1133
|
var element;
|
1049
1134
|
if (this.isInput){
|
1050
1135
|
element = this.element;
|
@@ -1119,7 +1204,7 @@
|
|
1119
1204
|
},
|
1120
1205
|
|
1121
1206
|
keydown: function(e){
|
1122
|
-
if (this.picker.is(':
|
1207
|
+
if (!this.picker.is(':visible')){
|
1123
1208
|
if (e.keyCode === 27) // allow escape to hide and re-show picker
|
1124
1209
|
this.show();
|
1125
1210
|
return;
|
@@ -1159,7 +1244,7 @@
|
|
1159
1244
|
newViewDate = new Date(focusDate);
|
1160
1245
|
newViewDate.setUTCDate(focusDate.getUTCDate() + dir);
|
1161
1246
|
}
|
1162
|
-
if (this.dateWithinRange(
|
1247
|
+
if (this.dateWithinRange(newViewDate)){
|
1163
1248
|
this.focusDate = this.viewDate = newViewDate;
|
1164
1249
|
this.setValue();
|
1165
1250
|
this.fill();
|
@@ -1187,7 +1272,7 @@
|
|
1187
1272
|
newViewDate = new Date(focusDate);
|
1188
1273
|
newViewDate.setUTCDate(focusDate.getUTCDate() + dir * 7);
|
1189
1274
|
}
|
1190
|
-
if (this.dateWithinRange(
|
1275
|
+
if (this.dateWithinRange(newViewDate)){
|
1191
1276
|
this.focusDate = this.viewDate = newViewDate;
|
1192
1277
|
this.setValue();
|
1193
1278
|
this.fill();
|
@@ -1210,6 +1295,11 @@
|
|
1210
1295
|
this.fill();
|
1211
1296
|
if (this.picker.is(':visible')){
|
1212
1297
|
e.preventDefault();
|
1298
|
+
if (typeof e.stopPropagation === 'function') {
|
1299
|
+
e.stopPropagation(); // All modern browsers, IE9+
|
1300
|
+
} else {
|
1301
|
+
e.cancelBubble = true; // IE6,7,8 ignore "stopPropagation"
|
1302
|
+
}
|
1213
1303
|
if (this.o.autoclose)
|
1214
1304
|
this.hide();
|
1215
1305
|
}
|
@@ -1244,9 +1334,9 @@
|
|
1244
1334
|
this.viewMode = Math.max(this.o.minViewMode, Math.min(2, this.viewMode + dir));
|
1245
1335
|
}
|
1246
1336
|
this.picker
|
1247
|
-
.
|
1337
|
+
.children('div')
|
1248
1338
|
.hide()
|
1249
|
-
.filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName)
|
1339
|
+
.filter('.datepicker-' + DPGlobal.modes[this.viewMode].clsName)
|
1250
1340
|
.css('display', 'block');
|
1251
1341
|
this.updateNavArrows();
|
1252
1342
|
}
|
@@ -1259,8 +1349,7 @@
|
|
1259
1349
|
});
|
1260
1350
|
delete options.inputs;
|
1261
1351
|
|
1262
|
-
$(this.inputs)
|
1263
|
-
.datepicker(options)
|
1352
|
+
datepickerPlugin.call($(this.inputs), options)
|
1264
1353
|
.bind('changeDate', $.proxy(this.dateUpdated, this));
|
1265
1354
|
|
1266
1355
|
this.pickers = $.map(this.inputs, function(i){
|
@@ -1294,6 +1383,8 @@
|
|
1294
1383
|
var dp = $(e.target).data('datepicker'),
|
1295
1384
|
new_date = dp.getUTCDate(),
|
1296
1385
|
i = $.inArray(e.target, this.inputs),
|
1386
|
+
j = i - 1,
|
1387
|
+
k = i + 1,
|
1297
1388
|
l = this.inputs.length;
|
1298
1389
|
if (i === -1)
|
1299
1390
|
return;
|
@@ -1303,16 +1394,16 @@
|
|
1303
1394
|
p.setUTCDate(new_date);
|
1304
1395
|
});
|
1305
1396
|
|
1306
|
-
if (new_date < this.dates[
|
1397
|
+
if (new_date < this.dates[j]){
|
1307
1398
|
// Date being moved earlier/left
|
1308
|
-
while (
|
1309
|
-
this.pickers[
|
1399
|
+
while (j >= 0 && new_date < this.dates[j]){
|
1400
|
+
this.pickers[j--].setUTCDate(new_date);
|
1310
1401
|
}
|
1311
1402
|
}
|
1312
|
-
else if (new_date > this.dates[
|
1403
|
+
else if (new_date > this.dates[k]){
|
1313
1404
|
// Date being moved later/right
|
1314
|
-
while (
|
1315
|
-
this.pickers[
|
1405
|
+
while (k < l && new_date > this.dates[k]){
|
1406
|
+
this.pickers[k++].setUTCDate(new_date);
|
1316
1407
|
}
|
1317
1408
|
}
|
1318
1409
|
this.updateDates();
|
@@ -1361,7 +1452,7 @@
|
|
1361
1452
|
}
|
1362
1453
|
|
1363
1454
|
var old = $.fn.datepicker;
|
1364
|
-
|
1455
|
+
var datepickerPlugin = function(option){
|
1365
1456
|
var args = Array.apply(null, arguments);
|
1366
1457
|
args.shift();
|
1367
1458
|
var internal_return;
|
@@ -1376,7 +1467,7 @@
|
|
1376
1467
|
locopts = opts_from_locale(xopts.language),
|
1377
1468
|
// Options priority: js args, data-attrs, locales, defaults
|
1378
1469
|
opts = $.extend({}, defaults, locopts, elopts, options);
|
1379
|
-
if ($this.
|
1470
|
+
if ($this.hasClass('input-daterange') || opts.inputs){
|
1380
1471
|
var ropts = {
|
1381
1472
|
inputs: opts.inputs || $this.find('input').toArray()
|
1382
1473
|
};
|
@@ -1397,13 +1488,17 @@
|
|
1397
1488
|
else
|
1398
1489
|
return this;
|
1399
1490
|
};
|
1491
|
+
$.fn.datepicker = datepickerPlugin;
|
1400
1492
|
|
1401
1493
|
var defaults = $.fn.datepicker.defaults = {
|
1402
1494
|
autoclose: false,
|
1403
1495
|
beforeShowDay: $.noop,
|
1496
|
+
beforeShowMonth: $.noop,
|
1404
1497
|
calendarWeeks: false,
|
1405
1498
|
clearBtn: false,
|
1499
|
+
toggleActive: false,
|
1406
1500
|
daysOfWeekDisabled: [],
|
1501
|
+
datesDisabled: [],
|
1407
1502
|
endDate: Infinity,
|
1408
1503
|
forceParse: true,
|
1409
1504
|
format: 'mm/dd/yyyy',
|
@@ -1418,7 +1513,10 @@
|
|
1418
1513
|
startView: 0,
|
1419
1514
|
todayBtn: false,
|
1420
1515
|
todayHighlight: false,
|
1421
|
-
weekStart: 0
|
1516
|
+
weekStart: 0,
|
1517
|
+
disableTouchKeyboard: false,
|
1518
|
+
enableOnReadonly: true,
|
1519
|
+
container: 'body'
|
1422
1520
|
};
|
1423
1521
|
var locale_opts = $.fn.datepicker.locale_opts = [
|
1424
1522
|
'format',
|
@@ -1546,7 +1644,7 @@
|
|
1546
1644
|
function match_part(){
|
1547
1645
|
var m = this.slice(0, parts[i].length),
|
1548
1646
|
p = parts[i].slice(0, m.length);
|
1549
|
-
return m === p;
|
1647
|
+
return m.toLowerCase() === p.toLowerCase();
|
1550
1648
|
}
|
1551
1649
|
if (parts.length === fparts.length){
|
1552
1650
|
var cnt;
|
@@ -1608,9 +1706,9 @@
|
|
1608
1706
|
},
|
1609
1707
|
headTemplate: '<thead>'+
|
1610
1708
|
'<tr>'+
|
1611
|
-
'<th class="prev"
|
1709
|
+
'<th class="prev">«</th>'+
|
1612
1710
|
'<th colspan="5" class="datepicker-switch"></th>'+
|
1613
|
-
'<th class="next"
|
1711
|
+
'<th class="next">»</th>'+
|
1614
1712
|
'</tr>'+
|
1615
1713
|
'</thead>',
|
1616
1714
|
contTemplate: '<tbody><tr><td colspan="7"></td></tr></tbody>',
|
@@ -1658,6 +1756,9 @@
|
|
1658
1756
|
return this;
|
1659
1757
|
};
|
1660
1758
|
|
1759
|
+
/* DATEPICKER VERSION
|
1760
|
+
* =================== */
|
1761
|
+
$.fn.datepicker.version = "1.4.0";
|
1661
1762
|
|
1662
1763
|
/* DATEPICKER DATA-API
|
1663
1764
|
* ================== */
|
@@ -1671,11 +1772,11 @@
|
|
1671
1772
|
return;
|
1672
1773
|
e.preventDefault();
|
1673
1774
|
// component click requires us to explicitly show it
|
1674
|
-
$this
|
1775
|
+
datepickerPlugin.call($this, 'show');
|
1675
1776
|
}
|
1676
1777
|
);
|
1677
1778
|
$(function(){
|
1678
|
-
$('[data-provide="datepicker-inline"]')
|
1779
|
+
datepickerPlugin.call($('[data-provide="datepicker-inline"]'));
|
1679
1780
|
});
|
1680
1781
|
|
1681
1782
|
}(window.jQuery));
|
@@ -4,11 +4,11 @@
|
|
4
4
|
*/
|
5
5
|
;(function($){
|
6
6
|
$.fn.datepicker.dates['fr'] = {
|
7
|
-
days: ["
|
8
|
-
daysShort: ["
|
9
|
-
daysMin: ["
|
10
|
-
months: ["
|
11
|
-
monthsShort: ["
|
7
|
+
days: ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi", "dimanche"],
|
8
|
+
daysShort: ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam.", "dim."],
|
9
|
+
daysMin: ["d", "l", "ma", "me", "j", "v", "s", "d"],
|
10
|
+
months: ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"],
|
11
|
+
monthsShort: ["janv.", "févr.", "mars", "avril", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."],
|
12
12
|
today: "Aujourd'hui",
|
13
13
|
clear: "Effacer",
|
14
14
|
weekStart: 1,
|
@@ -3,13 +3,13 @@
|
|
3
3
|
* Lytay TOUCH <lytaytouch@gmail.com>
|
4
4
|
*/
|
5
5
|
;(function($){
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
6
|
+
$.fn.datepicker.dates['kh'] = {
|
7
|
+
days: ["អាទិត្យ", "ចន្ទ", "អង្គារ", "ពុធ", "ព្រហស្បតិ៍", "សុក្រ", "សៅរ៍", "អាទិត្យ"],
|
8
|
+
daysShort: ["អា.ទិ", "ចន្ទ", "អង្គារ", "ពុធ", "ព្រ.ហ", "សុក្រ", "សៅរ៍", "អា.ទិ"],
|
9
|
+
daysMin: ["អា.ទិ", "ចន្ទ", "អង្គារ", "ពុធ", "ព្រ.ហ", "សុក្រ", "សៅរ៍", "អា.ទិ"],
|
10
|
+
months: ["មករា", "កុម្ភះ", "មិនា", "មេសា", "ឧសភា", "មិថុនា", "កក្កដា", "សីហា", "កញ្ញា", "តុលា", "វិច្ឆិកា", "ធ្នូ"],
|
11
|
+
monthsShort: ["មករា", "កុម្ភះ", "មិនា", "មេសា", "ឧសភា", "មិថុនា", "កក្កដា", "សីហា", "កញ្ញា", "តុលា", "វិច្ឆិកា", "ធ្នូ"],
|
12
|
+
today: "ថ្ងៃនេះ",
|
13
|
+
clear: "សំអាត"
|
14
|
+
};
|
15
15
|
}(jQuery));
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/**
|
2
|
+
* Montenegrin translation for bootstrap-datepicker
|
3
|
+
* Miodrag Nikač <miodrag@restartit.me>
|
4
|
+
*/
|
5
|
+
;(function($){
|
6
|
+
$.fn.datepicker.dates['me'] = {
|
7
|
+
days: ["Nedjelja","Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota", "Nedjelja"],
|
8
|
+
daysShort: ["Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub", "Ned"],
|
9
|
+
daysMin: ["Ne", "Po", "Ut", "Sr", "Če", "Pe", "Su", "Ne"],
|
10
|
+
months: ["Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"],
|
11
|
+
monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec"],
|
12
|
+
today: "Danas",
|
13
|
+
weekStart: 1,
|
14
|
+
clear: "Izbriši",
|
15
|
+
format: "dd.mm.yyyy"
|
16
|
+
};
|
17
|
+
}(jQuery));
|
@@ -4,11 +4,11 @@
|
|
4
4
|
*/
|
5
5
|
;(function($){
|
6
6
|
$.fn.datepicker.dates['nl-BE'] = {
|
7
|
-
days: ["
|
8
|
-
daysShort: ["
|
9
|
-
daysMin: ["
|
10
|
-
months: ["
|
11
|
-
monthsShort: ["
|
7
|
+
days: ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag", "zondag"],
|
8
|
+
daysShort: ["zo", "ma", "di", "wo", "do", "vr", "za", "zo"],
|
9
|
+
daysMin: ["zo", "ma", "di", "wo", "do", "vr", "za", "zo"],
|
10
|
+
months: ["januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"],
|
11
|
+
monthsShort: ["jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec"],
|
12
12
|
today: "Vandaag",
|
13
13
|
clear: "Leegmaken",
|
14
14
|
weekStart: 1,
|
@@ -4,11 +4,11 @@
|
|
4
4
|
*/
|
5
5
|
;(function($){
|
6
6
|
$.fn.datepicker.dates['nl'] = {
|
7
|
-
days: ["
|
8
|
-
daysShort: ["
|
9
|
-
daysMin: ["
|
10
|
-
months: ["
|
11
|
-
monthsShort: ["
|
7
|
+
days: ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag", "zondag"],
|
8
|
+
daysShort: ["zo", "ma", "di", "wo", "do", "vr", "za", "zo"],
|
9
|
+
daysMin: ["zo", "ma", "di", "wo", "do", "vr", "za", "zo"],
|
10
|
+
months: ["januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"],
|
11
|
+
monthsShort: ["jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec"],
|
12
12
|
today: "Vandaag",
|
13
13
|
clear: "Wissen",
|
14
14
|
weekStart: 1,
|
@@ -10,6 +10,8 @@
|
|
10
10
|
months: ["Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"],
|
11
11
|
monthsShort: ["Oca", "Şub", "Mar", "Nis", "May", "Haz", "Tem", "Ağu", "Eyl", "Eki", "Kas", "Ara"],
|
12
12
|
today: "Bugün",
|
13
|
+
clear: "Temizle",
|
14
|
+
weekStart: 1,
|
13
15
|
format: "dd.mm.yyyy"
|
14
16
|
};
|
15
17
|
}(jQuery));
|
@@ -10,6 +10,8 @@
|
|
10
10
|
months: ["Cічень", "Лютий", "Березень", "Квітень", "Травень", "Червень", "Липень", "Серпень", "Вересень", "Жовтень", "Листопад", "Грудень"],
|
11
11
|
monthsShort: ["Січ", "Лют", "Бер", "Кві", "Тра", "Чер", "Лип", "Сер", "Вер", "Жов", "Лис", "Гру"],
|
12
12
|
today: "Сьогодні",
|
13
|
+
clear: "Очистити",
|
14
|
+
format: "dd.mm.yyyy",
|
13
15
|
weekStart: 1
|
14
16
|
};
|
15
17
|
}(jQuery));
|
@@ -1,11 +1,9 @@
|
|
1
1
|
/*!
|
2
|
-
* Datepicker for Bootstrap
|
2
|
+
* Datepicker for Bootstrap v1.4.0 (https://github.com/eternicode/bootstrap-datepicker)
|
3
3
|
*
|
4
4
|
* Copyright 2012 Stefan Petre
|
5
5
|
* Improvements by Andrew Rowls
|
6
|
-
* Licensed under the Apache License v2.0
|
7
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
*
|
6
|
+
* Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0)
|
9
7
|
*/
|
10
8
|
.datepicker {
|
11
9
|
padding: 4px;
|
@@ -77,13 +75,9 @@
|
|
77
75
|
.datepicker > div {
|
78
76
|
display: none;
|
79
77
|
}
|
80
|
-
.datepicker.days
|
81
|
-
|
82
|
-
|
83
|
-
.datepicker.months div.datepicker-months {
|
84
|
-
display: block;
|
85
|
-
}
|
86
|
-
.datepicker.years div.datepicker-years {
|
78
|
+
.datepicker.days .datepicker-days,
|
79
|
+
.datepicker.months .datepicker-months,
|
80
|
+
.datepicker.years .datepicker-years {
|
87
81
|
display: block;
|
88
82
|
}
|
89
83
|
.datepicker table {
|
@@ -419,7 +413,7 @@
|
|
419
413
|
.datepicker table tr td span.new {
|
420
414
|
color: #999999;
|
421
415
|
}
|
422
|
-
.datepicker
|
416
|
+
.datepicker .datepicker-switch {
|
423
417
|
width: 145px;
|
424
418
|
}
|
425
419
|
.datepicker thead tr:first-child th,
|
@@ -436,15 +430,17 @@
|
|
436
430
|
padding: 0 2px 0 5px;
|
437
431
|
vertical-align: middle;
|
438
432
|
}
|
439
|
-
.datepicker thead tr:first-child
|
433
|
+
.datepicker thead tr:first-child .cw {
|
440
434
|
cursor: default;
|
441
435
|
background-color: transparent;
|
442
436
|
}
|
437
|
+
.input-append.date .add-on,
|
438
|
+
.input-prepend.date .add-on {
|
439
|
+
cursor: pointer;
|
440
|
+
}
|
443
441
|
.input-append.date .add-on i,
|
444
442
|
.input-prepend.date .add-on i {
|
445
|
-
|
446
|
-
width: 16px;
|
447
|
-
height: 16px;
|
443
|
+
margin-top: 3px;
|
448
444
|
}
|
449
445
|
.input-daterange input {
|
450
446
|
text-align: center;
|
@@ -463,10 +459,10 @@
|
|
463
459
|
display: inline-block;
|
464
460
|
width: auto;
|
465
461
|
min-width: 16px;
|
466
|
-
height:
|
462
|
+
height: 18px;
|
467
463
|
padding: 4px 5px;
|
468
464
|
font-weight: normal;
|
469
|
-
line-height:
|
465
|
+
line-height: 18px;
|
470
466
|
text-align: center;
|
471
467
|
text-shadow: 0 1px 0 #ffffff;
|
472
468
|
vertical-align: middle;
|
@@ -475,36 +471,3 @@
|
|
475
471
|
margin-left: -5px;
|
476
472
|
margin-right: -5px;
|
477
473
|
}
|
478
|
-
.datepicker.dropdown-menu {
|
479
|
-
position: absolute;
|
480
|
-
top: 100%;
|
481
|
-
left: 0;
|
482
|
-
z-index: 1000;
|
483
|
-
float: left;
|
484
|
-
display: none;
|
485
|
-
min-width: 160px;
|
486
|
-
list-style: none;
|
487
|
-
background-color: #ffffff;
|
488
|
-
border: 1px solid #ccc;
|
489
|
-
border: 1px solid rgba(0, 0, 0, 0.2);
|
490
|
-
-webkit-border-radius: 5px;
|
491
|
-
-moz-border-radius: 5px;
|
492
|
-
border-radius: 5px;
|
493
|
-
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
494
|
-
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
495
|
-
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
496
|
-
-webkit-background-clip: padding-box;
|
497
|
-
-moz-background-clip: padding;
|
498
|
-
background-clip: padding-box;
|
499
|
-
*border-right-width: 2px;
|
500
|
-
*border-bottom-width: 2px;
|
501
|
-
color: #333333;
|
502
|
-
font-size: 13px;
|
503
|
-
line-height: 20px;
|
504
|
-
}
|
505
|
-
.datepicker.dropdown-menu th,
|
506
|
-
.datepicker.datepicker-inline th,
|
507
|
-
.datepicker.dropdown-menu td,
|
508
|
-
.datepicker.datepicker-inline td {
|
509
|
-
padding: 4px 5px;
|
510
|
-
}
|
@@ -1,11 +1,9 @@
|
|
1
1
|
/*!
|
2
|
-
* Datepicker for Bootstrap
|
2
|
+
* Datepicker for Bootstrap v1.4.0 (https://github.com/eternicode/bootstrap-datepicker)
|
3
3
|
*
|
4
4
|
* Copyright 2012 Stefan Petre
|
5
5
|
* Improvements by Andrew Rowls
|
6
|
-
* Licensed under the Apache License v2.0
|
7
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
*
|
6
|
+
* Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0)
|
9
7
|
*/
|
10
8
|
.datepicker {
|
11
9
|
padding: 4px;
|
@@ -75,13 +73,9 @@
|
|
75
73
|
.datepicker > div {
|
76
74
|
display: none;
|
77
75
|
}
|
78
|
-
.datepicker.days
|
79
|
-
|
80
|
-
|
81
|
-
.datepicker.months div.datepicker-months {
|
82
|
-
display: block;
|
83
|
-
}
|
84
|
-
.datepicker.years div.datepicker-years {
|
76
|
+
.datepicker.days .datepicker-days,
|
77
|
+
.datepicker.months .datepicker-months,
|
78
|
+
.datepicker.years .datepicker-years {
|
85
79
|
display: block;
|
86
80
|
}
|
87
81
|
.datepicker table {
|
@@ -705,7 +699,7 @@ fieldset[disabled] .datepicker table tr td span.active.disabled:hover.active {
|
|
705
699
|
.datepicker table tr td span.new {
|
706
700
|
color: #999999;
|
707
701
|
}
|
708
|
-
.datepicker
|
702
|
+
.datepicker .datepicker-switch {
|
709
703
|
width: 145px;
|
710
704
|
}
|
711
705
|
.datepicker thead tr:first-child th,
|
@@ -722,13 +716,16 @@ fieldset[disabled] .datepicker table tr td span.active.disabled:hover.active {
|
|
722
716
|
padding: 0 2px 0 5px;
|
723
717
|
vertical-align: middle;
|
724
718
|
}
|
725
|
-
.datepicker thead tr:first-child
|
719
|
+
.datepicker thead tr:first-child .cw {
|
726
720
|
cursor: default;
|
727
721
|
background-color: transparent;
|
728
722
|
}
|
729
|
-
.input-group.date .input-group-addon
|
723
|
+
.input-group.date .input-group-addon {
|
730
724
|
cursor: pointer;
|
731
725
|
}
|
726
|
+
.input-daterange {
|
727
|
+
width: 100%;
|
728
|
+
}
|
732
729
|
.input-daterange input {
|
733
730
|
text-align: center;
|
734
731
|
}
|
@@ -753,34 +750,3 @@ fieldset[disabled] .datepicker table tr td span.active.disabled:hover.active {
|
|
753
750
|
margin-left: -5px;
|
754
751
|
margin-right: -5px;
|
755
752
|
}
|
756
|
-
.datepicker.dropdown-menu {
|
757
|
-
position: absolute;
|
758
|
-
top: 100%;
|
759
|
-
left: 0;
|
760
|
-
z-index: 1000;
|
761
|
-
float: left;
|
762
|
-
display: none;
|
763
|
-
min-width: 160px;
|
764
|
-
list-style: none;
|
765
|
-
background-color: #ffffff;
|
766
|
-
border: 1px solid #ccc;
|
767
|
-
border: 1px solid rgba(0, 0, 0, 0.2);
|
768
|
-
border-radius: 5px;
|
769
|
-
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
770
|
-
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
771
|
-
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
772
|
-
-webkit-background-clip: padding-box;
|
773
|
-
-moz-background-clip: padding;
|
774
|
-
background-clip: padding-box;
|
775
|
-
*border-right-width: 2px;
|
776
|
-
*border-bottom-width: 2px;
|
777
|
-
color: #333333;
|
778
|
-
font-size: 13px;
|
779
|
-
line-height: 1.42857143;
|
780
|
-
}
|
781
|
-
.datepicker.dropdown-menu th,
|
782
|
-
.datepicker.datepicker-inline th,
|
783
|
-
.datepicker.dropdown-menu td,
|
784
|
-
.datepicker.datepicker-inline td {
|
785
|
-
padding: 0px 5px;
|
786
|
-
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootstrap-datepicker-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gonzalo Rodríguez-Baltanás Díaz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -133,6 +133,7 @@ files:
|
|
133
133
|
- vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.kr.js
|
134
134
|
- vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.lt.js
|
135
135
|
- vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.lv.js
|
136
|
+
- vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.me.js
|
136
137
|
- vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.mk.js
|
137
138
|
- vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.ms.js
|
138
139
|
- vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.nb.js
|
@@ -182,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
182
183
|
version: '0'
|
183
184
|
requirements: []
|
184
185
|
rubyforge_project:
|
185
|
-
rubygems_version: 2.4.
|
186
|
+
rubygems_version: 2.4.5
|
186
187
|
signing_key:
|
187
188
|
specification_version: 4
|
188
189
|
summary: A date picker for Twitter Bootstrap
|