bootstrap-datepicker-rails 1.1.1.10 → 1.1.1.11

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: aefc172c79b26c84138f82f114ddf75028f31350
4
- data.tar.gz: 31d9a76013ba1784ff145d141ec2790aac26b705
3
+ metadata.gz: 99299e78e0957b2b87bb99d342fa95a49ef0b2f5
4
+ data.tar.gz: 3b9269f54a83b589a6fcf485cb0b3f7ae91a85eb
5
5
  SHA512:
6
- metadata.gz: 28758135ac49d1cdfc298a184fa9e71aeeb5d426e09e3bd7334342f7b03547a419b4e27361482a9aabefd04dac87cdafcb4914f29dbabefaf8ad4b65727973c1
7
- data.tar.gz: 0df62ea0ae5093a7cd2d97a5a0ced900380071173263a6bd9a6423fa006bc5cd881b56055e80ee79a6a9ccc9a6dd2c113390c8c7b022b5523c7ad0702f8a708b
6
+ metadata.gz: 9ac85d9d6c09fbc265f8897a146fd78fa307943a17b8c17ed52910ef5fbf175e743cd52453691f9d0805a55fb4290765d721909fba182445ec7a4ab39455ed1e
7
+ data.tar.gz: ef4c4197fdd1a765a094e29e1773997cf7511edf8b7a88bd7d22c68031f0b10a31c4afdbb8e434e03baa7faebdc1cf68d2a20d2b47433fe2d17cc27233f29938
@@ -1,5 +1,5 @@
1
1
  module BootstrapDatepickerRails
2
2
  module Rails
3
- VERSION = "1.1.1.10"
3
+ VERSION = "1.1.1.11"
4
4
  end
5
5
  end
@@ -31,13 +31,62 @@
31
31
  var today = new Date();
32
32
  return UTCDate(today.getFullYear(), today.getMonth(), today.getDate());
33
33
  }
34
+ function alias(method){
35
+ return function(){
36
+ return this[method].apply(this, arguments);
37
+ };
38
+ }
39
+
40
+ var DateArray = (function(){
41
+ var extras = {
42
+ get: function(i){
43
+ return this.slice(i)[0];
44
+ },
45
+ contains: function(d){
46
+ // Array.indexOf is not cross-browser;
47
+ // $.inArray doesn't work with Dates
48
+ var val = d && d.valueOf();
49
+ for (var i=0, l=this.length; i<l; i++)
50
+ if (this[i].valueOf() === val)
51
+ return i;
52
+ return -1;
53
+ },
54
+ remove: function(i){
55
+ this.splice(i,1);
56
+ },
57
+ replace: function(new_array){
58
+ if (!new_array)
59
+ return;
60
+ if (!$.isArray(new_array))
61
+ new_array = [new_array];
62
+ this.clear();
63
+ this.push.apply(this, new_array);
64
+ },
65
+ clear: function(){
66
+ this.splice(0);
67
+ },
68
+ copy: function(){
69
+ var a = new DateArray();
70
+ a.replace(this);
71
+ return a;
72
+ }
73
+ };
74
+
75
+ return function(){
76
+ var a = [];
77
+ a.push.apply(a, arguments);
78
+ $.extend(a, extras);
79
+ return a;
80
+ };
81
+ })();
34
82
 
35
83
 
36
84
  // Picker object
37
85
 
38
86
  var Datepicker = function(element, options) {
39
- this.date = undefined;
87
+ this.dates = new DateArray();
40
88
  this.viewDate = UTCToday();
89
+ this.focusDate = null;
41
90
 
42
91
  this._process_options(options);
43
92
 
@@ -137,6 +186,16 @@
137
186
 
138
187
  o.startView = Math.max(o.startView, o.minViewMode);
139
188
 
189
+ // true, false, or Number > 0
190
+ if (o.multidate !== true){
191
+ o.multidate = Number(o.multidate) || false;
192
+ if (o.multidate !== false)
193
+ o.multidate = Math.max(0, o.multidate);
194
+ else
195
+ o.multidate = 1;
196
+ }
197
+ o.multidateSeparator = String(o.multidateSeparator);
198
+
140
199
  o.weekStart %= 7;
141
200
  o.weekEnd = ((o.weekStart + 6) % 7);
142
201
 
@@ -204,17 +263,31 @@
204
263
  _events: [],
205
264
  _secondaryEvents: [],
206
265
  _applyEvents: function(evs){
207
- for (var i=0, el, ev; i<evs.length; i++){
266
+ for (var i=0, el, ch, ev; i<evs.length; i++){
208
267
  el = evs[i][0];
209
- ev = evs[i][1];
210
- el.on(ev);
268
+ if (evs[i].length === 2){
269
+ ch = undefined;
270
+ ev = evs[i][1];
271
+ }
272
+ else if (evs[i].length === 3){
273
+ ch = evs[i][1];
274
+ ev = evs[i][2];
275
+ }
276
+ el.on(ev, ch);
211
277
  }
212
278
  },
213
279
  _unapplyEvents: function(evs){
214
- for (var i=0, el, ev; i<evs.length; i++){
280
+ for (var i=0, el, ev, ch; i<evs.length; i++){
215
281
  el = evs[i][0];
216
- ev = evs[i][1];
217
- el.off(ev);
282
+ if (evs[i].length === 2){
283
+ ch = undefined;
284
+ ev = evs[i][1];
285
+ }
286
+ else if (evs[i].length === 3){
287
+ ch = evs[i][1];
288
+ ev = evs[i][2];
289
+ }
290
+ el.off(ev, ch);
218
291
  }
219
292
  },
220
293
  _buildEvents: function(){
@@ -222,7 +295,10 @@
222
295
  this._events = [
223
296
  [this.element, {
224
297
  focus: $.proxy(this.show, this),
225
- keyup: $.proxy(function(){ this.update() }, this),
298
+ keyup: $.proxy(function(e){
299
+ if ($.inArray(e.keyCode, [27,37,39,38,40,32,13,9]) === -1)
300
+ this.update();
301
+ }, this),
226
302
  keydown: $.proxy(this.keydown, this)
227
303
  }]
228
304
  ];
@@ -232,7 +308,10 @@
232
308
  // For components that are not readonly, allow keyboard nav
233
309
  [this.element.find('input'), {
234
310
  focus: $.proxy(this.show, this),
235
- keyup: $.proxy(function(){ this.update() }, this),
311
+ keyup: $.proxy(function(e){
312
+ if ($.inArray(e.keyCode, [27,37,39,38,40,32,13,9]) === -1)
313
+ this.update();
314
+ }, this),
236
315
  keydown: $.proxy(this.keydown, this)
237
316
  }],
238
317
  [this.component, {
@@ -250,6 +329,20 @@
250
329
  }]
251
330
  ];
252
331
  }
332
+ this._events.push(
333
+ // Component: listen for blur on element descendants
334
+ [this.element, '*', {
335
+ blur: $.proxy(function(e){
336
+ this._focused_from = e.target;
337
+ }, this)
338
+ }],
339
+ // Input: listen for blur on element
340
+ [this.element, {
341
+ blur: $.proxy(function(e){
342
+ this._focused_from = e.target;
343
+ }, this)
344
+ }]
345
+ );
253
346
 
254
347
  this._secondaryEvents = [
255
348
  [this.picker, {
@@ -288,35 +381,42 @@
288
381
  this._unapplyEvents(this._secondaryEvents);
289
382
  },
290
383
  _trigger: function(event, altdate){
291
- var date = altdate || this.date,
384
+ var date = altdate || this.dates.get(-1),
292
385
  local_date = this._utc_to_local(date);
293
386
 
294
387
  this.element.trigger({
295
388
  type: event,
296
389
  date: local_date,
297
- format: $.proxy(function(altformat){
298
- var format = altformat || this.o.format;
390
+ dates: $.map(this.dates, this._utc_to_local),
391
+ format: $.proxy(function(ix, format){
392
+ if (arguments.length === 0){
393
+ ix = this.dates.length - 1;
394
+ format = this.o.format;
395
+ }
396
+ else if (typeof ix === 'string'){
397
+ format = ix;
398
+ ix = this.dates.length - 1;
399
+ }
400
+ format = format || this.o.format;
401
+ var date = this.dates.get(ix);
299
402
  return DPGlobal.formatDate(date, format, this.o.language);
300
403
  }, this)
301
404
  });
302
405
  },
303
406
 
304
- show: function(e) {
407
+ show: function(){
305
408
  if (!this.isInline)
306
409
  this.picker.appendTo('body');
307
410
  this.picker.show();
308
- this.height = this.component ? this.component.outerHeight() : this.element.outerHeight();
309
411
  this.place();
310
412
  this._attachSecondaryEvents();
311
- if (e) {
312
- e.preventDefault();
313
- }
314
413
  this._trigger('show');
315
414
  },
316
415
 
317
416
  hide: function(){
318
417
  if(this.isInline) return;
319
418
  if (!this.picker.is(':visible')) return;
419
+ this.focusDate = null;
320
420
  this.picker.hide().detach();
321
421
  this._detachSecondaryEvents();
322
422
  this.viewMode = this.o.startView;
@@ -357,23 +457,37 @@
357
457
  return utc && new Date(Date.UTC(utc.getUTCFullYear(), utc.getUTCMonth(), utc.getUTCDate()));
358
458
  },
359
459
 
460
+ getDates: function(){
461
+ return $.map(this.dates, this._utc_to_local);
462
+ },
463
+
464
+ getUTCDates: function(){
465
+ return $.map(this.dates, function(d){ return new Date(d); });
466
+ },
467
+
360
468
  getDate: function() {
361
469
  return this._utc_to_local(this.getUTCDate());
362
470
  },
363
471
 
364
472
  getUTCDate: function() {
365
- return this.date;
473
+ return new Date(this.dates.get(-1));
366
474
  },
367
475
 
368
- setDate: function(d) {
369
- this.setUTCDate(this._local_to_utc(d));
476
+ setDates: function() {
477
+ this.update.apply(this, arguments);
478
+ this._trigger('changeDate');
479
+ this.setValue();
370
480
  },
371
481
 
372
- setUTCDate: function(d) {
373
- this.date = d;
482
+ setUTCDates: function() {
483
+ this.update.apply(this, $.map(arguments, this._utc_to_local));
484
+ this._trigger('changeDate');
374
485
  this.setValue();
375
486
  },
376
487
 
488
+ setDate: alias('setDates'),
489
+ setUTCDate: alias('setUTCDates'),
490
+
377
491
  setValue: function() {
378
492
  var formatted = this.getFormattedDate();
379
493
  if (!this.isInput) {
@@ -388,7 +502,11 @@
388
502
  getFormattedDate: function(format) {
389
503
  if (format === undefined)
390
504
  format = this.o.format;
391
- return DPGlobal.formatDate(this.date, format, this.o.language);
505
+
506
+ var lang = this.o.language;
507
+ return $.map(this.dates, function(d){
508
+ return DPGlobal.formatDate(d, format, lang);
509
+ }).join(this.o.multidateSeparator);
392
510
  },
393
511
 
394
512
  setStartDate: function(startDate){
@@ -419,7 +537,7 @@
419
537
  scrollTop = $window.scrollTop();
420
538
 
421
539
  var zIndex = parseInt(this.element.parents().filter(function() {
422
- return $(this).css('z-index') != 'auto';
540
+ return $(this).css('z-index') !== 'auto';
423
541
  }).first().css('z-index'))+10;
424
542
  var offset = this.component ? this.component.parent().offset() : this.element.offset();
425
543
  var height = this.component ? this.component.outerHeight(true) : this.element.outerHeight(false);
@@ -477,42 +595,55 @@
477
595
  update: function(){
478
596
  if (!this._allow_update) return;
479
597
 
480
- var oldDate = this.date && new Date(this.date),
481
- date, fromArgs = false;
598
+ var oldDates = this.dates.copy(),
599
+ dates = [],
600
+ fromArgs = false;
482
601
  if(arguments.length) {
483
- date = arguments[0];
484
- if (date instanceof Date)
485
- date = this._local_to_utc(date);
602
+ $.each(arguments, $.proxy(function(i, date){
603
+ if (date instanceof Date)
604
+ date = this._local_to_utc(date);
605
+ dates.push(date);
606
+ }, this));
486
607
  fromArgs = true;
487
608
  } else {
488
- date = this.isInput ? this.element.val() : this.element.data('date') || this.element.find('input').val();
609
+ dates = this.isInput
610
+ ? this.element.val()
611
+ : this.element.data('date') || this.element.find('input').val();
612
+ if (dates && this.o.multidate)
613
+ dates = dates.split(this.o.multidateSeparator);
614
+ else
615
+ dates = [dates];
489
616
  delete this.element.data().date;
490
617
  }
491
618
 
492
- this.date = DPGlobal.parseDate(date, this.o.format, this.o.language);
493
-
494
- if (this.date < this.o.startDate) {
619
+ dates = $.map(dates, $.proxy(function(date){
620
+ return DPGlobal.parseDate(date, this.o.format, this.o.language);
621
+ }, this));
622
+ dates = $.grep(dates, $.proxy(function(date){
623
+ return (
624
+ date < this.o.startDate ||
625
+ date > this.o.endDate ||
626
+ !date
627
+ );
628
+ }, this), true);
629
+ this.dates.replace(dates);
630
+
631
+ if (this.dates.length)
632
+ this.viewDate = new Date(this.dates.get(-1));
633
+ else if (this.viewDate < this.o.startDate)
495
634
  this.viewDate = new Date(this.o.startDate);
496
- this.date = new Date(this.o.startDate);
497
- } else if (this.date > this.o.endDate) {
635
+ else if (this.viewDate > this.o.endDate)
498
636
  this.viewDate = new Date(this.o.endDate);
499
- this.date = new Date(this.o.endDate);
500
- } else if (this.date) {
501
- this.viewDate = new Date(this.date);
502
- this.date = new Date(this.date);
503
- } else {
504
- this.date = undefined;
505
- }
506
637
 
507
638
  if (fromArgs) {
508
639
  // setting date by clicking
509
640
  this.setValue();
510
- } else if (date) {
641
+ } else if (dates.length) {
511
642
  // setting date by typing
512
- if (oldDate && this.date && oldDate.getTime() !== this.date.getTime())
643
+ if (String(oldDates) !== String(this.dates))
513
644
  this._trigger('changeDate');
514
645
  }
515
- if (!this.date && oldDate)
646
+ if (!this.dates.length && oldDates.length)
516
647
  this._trigger('clearDate');
517
648
 
518
649
  this.fill();
@@ -554,23 +685,23 @@
554
685
  var cls = [],
555
686
  year = this.viewDate.getUTCFullYear(),
556
687
  month = this.viewDate.getUTCMonth(),
557
- currentDate = this.date && this.date.valueOf(),
558
688
  today = new Date();
559
- if (date.getUTCFullYear() < year || (date.getUTCFullYear() == year && date.getUTCMonth() < month)) {
689
+ if (date.getUTCFullYear() < year || (date.getUTCFullYear() === year && date.getUTCMonth() < month)) {
560
690
  cls.push('old');
561
- } else if (date.getUTCFullYear() > year || (date.getUTCFullYear() == year && date.getUTCMonth() > month)) {
691
+ } else if (date.getUTCFullYear() > year || (date.getUTCFullYear() === year && date.getUTCMonth() > month)) {
562
692
  cls.push('new');
563
693
  }
694
+ if (this.focusDate && date.valueOf() === this.focusDate.valueOf())
695
+ cls.push('focused');
564
696
  // Compare internal UTC date with local today, not UTC today
565
697
  if (this.o.todayHighlight &&
566
- date.getUTCFullYear() == today.getFullYear() &&
567
- date.getUTCMonth() == today.getMonth() &&
568
- date.getUTCDate() == today.getDate()) {
698
+ date.getUTCFullYear() === today.getFullYear() &&
699
+ date.getUTCMonth() === today.getMonth() &&
700
+ date.getUTCDate() === today.getDate()) {
569
701
  cls.push('today');
570
702
  }
571
- if (date.valueOf() == currentDate) {
703
+ if (this.dates.contains(date) !== -1)
572
704
  cls.push('active');
573
- }
574
705
  if (date.valueOf() < this.o.startDate || date.valueOf() > this.o.endDate ||
575
706
  $.inArray(date.getUTCDay(), this.o.daysOfWeekDisabled) !== -1) {
576
707
  cls.push('disabled');
@@ -579,7 +710,7 @@
579
710
  if (date > this.range[0] && date < this.range[this.range.length-1]){
580
711
  cls.push('range');
581
712
  }
582
- if ($.inArray(date.valueOf(), this.range) != -1){
713
+ if ($.inArray(date.valueOf(), this.range) !== -1){
583
714
  cls.push('selected');
584
715
  }
585
716
  }
@@ -615,7 +746,7 @@
615
746
  var html = [];
616
747
  var clsName;
617
748
  while(prevMonth.valueOf() < nextMonth) {
618
- if (prevMonth.getUTCDay() == this.o.weekStart) {
749
+ if (prevMonth.getUTCDay() === this.o.weekStart) {
619
750
  html.push('<tr>');
620
751
  if(this.o.calendarWeeks){
621
752
  // ISO 8601: First week contains first thursday.
@@ -654,29 +785,31 @@
654
785
 
655
786
  clsName = $.unique(clsName);
656
787
  html.push('<td class="'+clsName.join(' ')+'"' + (tooltip ? ' title="'+tooltip+'"' : '') + '>'+prevMonth.getUTCDate() + '</td>');
657
- if (prevMonth.getUTCDay() == this.o.weekEnd) {
788
+ if (prevMonth.getUTCDay() === this.o.weekEnd) {
658
789
  html.push('</tr>');
659
790
  }
660
791
  prevMonth.setUTCDate(prevMonth.getUTCDate()+1);
661
792
  }
662
793
  this.picker.find('.datepicker-days tbody').empty().append(html.join(''));
663
- var currentYear = this.date && this.date.getUTCFullYear();
664
794
 
665
795
  var months = this.picker.find('.datepicker-months')
666
796
  .find('th:eq(1)')
667
797
  .text(year)
668
798
  .end()
669
799
  .find('span').removeClass('active');
670
- if (currentYear && currentYear == year) {
671
- months.eq(this.date && this.date.getUTCMonth()).addClass('active');
672
- }
800
+
801
+ $.each(this.dates, function(i, d){
802
+ if (d.getUTCFullYear() === year)
803
+ months.eq(d.getUTCMonth()).addClass('active');
804
+ });
805
+
673
806
  if (year < startYear || year > endYear) {
674
807
  months.addClass('disabled');
675
808
  }
676
- if (year == startYear) {
809
+ if (year === startYear) {
677
810
  months.slice(0, startMonth).addClass('disabled');
678
811
  }
679
- if (year == endYear) {
812
+ if (year === endYear) {
680
813
  months.slice(endMonth+1).addClass('disabled');
681
814
  }
682
815
 
@@ -688,8 +821,19 @@
688
821
  .end()
689
822
  .find('td');
690
823
  year -= 1;
824
+ var years = $.map(this.dates, function(d){ return d.getUTCFullYear(); }),
825
+ classes;
691
826
  for (var i = -1; i < 11; i++) {
692
- html += '<span class="year'+(i == -1 ? ' old' : i == 10 ? ' new' : '')+(currentYear == year ? ' active' : '')+(year < startYear || year > endYear ? ' disabled' : '')+'">'+year+'</span>';
827
+ classes = ['year'];
828
+ if (i === -1)
829
+ classes.push('old');
830
+ else if (i === 10)
831
+ classes.push('new');
832
+ if ($.inArray(year, years) !== -1)
833
+ classes.push('active');
834
+ if (year < startYear || year > endYear)
835
+ classes.push('disabled');
836
+ html += '<span class="' + classes.join(' ') + '">'+year+'</span>';
693
837
  year += 1;
694
838
  }
695
839
  yearCont.html(html);
@@ -734,7 +878,7 @@
734
878
  e.preventDefault();
735
879
  var target = $(e.target).closest('span, td, th'),
736
880
  year, month, day;
737
- if (target.length == 1) {
881
+ if (target.length === 1) {
738
882
  switch(target[0].nodeName.toLowerCase()) {
739
883
  case 'th':
740
884
  switch(target[0].className) {
@@ -743,7 +887,7 @@
743
887
  break;
744
888
  case 'prev':
745
889
  case 'next':
746
- var dir = DPGlobal.modes[this.viewMode].navStep * (target[0].className == 'prev' ? -1 : 1);
890
+ var dir = DPGlobal.modes[this.viewMode].navStep * (target[0].className === 'prev' ? -1 : 1);
747
891
  switch(this.viewMode){
748
892
  case 0:
749
893
  this.viewDate = this.moveMonth(this.viewDate, dir);
@@ -763,7 +907,7 @@
763
907
  date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0);
764
908
 
765
909
  this.showMode(-2);
766
- var which = this.o.todayBtn == 'linked' ? null : 'view';
910
+ var which = this.o.todayBtn === 'linked' ? null : 'view';
767
911
  this._setDate(date, which);
768
912
  break;
769
913
  case 'clear':
@@ -820,7 +964,7 @@
820
964
  month -= 1;
821
965
  }
822
966
  } else if (target.is('.new')) {
823
- if (month == 11) {
967
+ if (month === 11) {
824
968
  month = 0;
825
969
  year += 1;
826
970
  } else {
@@ -832,13 +976,34 @@
832
976
  break;
833
977
  }
834
978
  }
979
+ if (this.picker.is(':visible') && this._focused_from){
980
+ $(this._focused_from).focus();
981
+ }
982
+ delete this._focused_from;
983
+ },
984
+
985
+ _toggle_multidate: function( date ) {
986
+ var ix = this.dates.contains(date);
987
+ if (!date){
988
+ this.dates.clear();
989
+ }
990
+ else if (ix !== -1){
991
+ this.dates.remove(ix);
992
+ }
993
+ else{
994
+ this.dates.push(date);
995
+ }
996
+ if (typeof this.o.multidate === 'number')
997
+ while (this.dates.length > this.o.multidate)
998
+ this.dates.remove(0);
835
999
  },
836
1000
 
837
1001
  _setDate: function(date, which){
838
- if (!which || which == 'date')
839
- this.date = date && new Date(date);
840
- if (!which || which == 'view')
1002
+ if (!which || which === 'date')
1003
+ this._toggle_multidate(date && new Date(date));
1004
+ if (!which || which === 'view')
841
1005
  this.viewDate = date && new Date(date);
1006
+
842
1007
  this.fill();
843
1008
  this.setValue();
844
1009
  this._trigger('changeDate');
@@ -851,7 +1016,7 @@
851
1016
  if (element) {
852
1017
  element.change();
853
1018
  }
854
- if (this.o.autoclose && (!which || which == 'date')) {
1019
+ if (this.o.autoclose && (!which || which === 'date')) {
855
1020
  this.hide();
856
1021
  }
857
1022
  },
@@ -865,14 +1030,14 @@
865
1030
  mag = Math.abs(dir),
866
1031
  new_month, test;
867
1032
  dir = dir > 0 ? 1 : -1;
868
- if (mag == 1){
869
- test = dir == -1
1033
+ if (mag === 1){
1034
+ test = dir === -1
870
1035
  // If going back one month, make sure month is not current month
871
1036
  // (eg, Mar 31 -> Feb 31 == Feb 28, not Mar 02)
872
- ? function(){ return new_date.getUTCMonth() == month; }
1037
+ ? function(){ return new_date.getUTCMonth() === month; }
873
1038
  // If going forward one month, make sure month is as expected
874
1039
  // (eg, Jan 31 -> Feb 31 == Feb 28, not Mar 02)
875
- : function(){ return new_date.getUTCMonth() != new_month; };
1040
+ : function(){ return new_date.getUTCMonth() !== new_month; };
876
1041
  new_month = month + dir;
877
1042
  new_date.setUTCMonth(new_month);
878
1043
  // Dec -> Jan (12) or Jan -> Dec (-1) -- limit expected date to 0-11
@@ -886,7 +1051,7 @@
886
1051
  // ...then reset the day, keeping it in the new month
887
1052
  new_month = new_date.getUTCMonth();
888
1053
  new_date.setUTCDate(day);
889
- test = function(){ return new_month != new_date.getUTCMonth(); };
1054
+ test = function(){ return new_month !== new_date.getUTCMonth(); };
890
1055
  }
891
1056
  // Common date-resetting loop -- if date is beyond end of month, make it
892
1057
  // end of month
@@ -907,81 +1072,104 @@
907
1072
 
908
1073
  keydown: function(e){
909
1074
  if (this.picker.is(':not(:visible)')){
910
- if (e.keyCode == 27) // allow escape to hide and re-show picker
1075
+ if (e.keyCode === 27) // allow escape to hide and re-show picker
911
1076
  this.show();
912
1077
  return;
913
1078
  }
914
1079
  var dateChanged = false,
915
- dir, newDate, newViewDate;
1080
+ dir, newDate, newViewDate,
1081
+ focusDate = this.focusDate || this.viewDate;
916
1082
  switch(e.keyCode){
917
1083
  case 27: // escape
918
- this.hide();
1084
+ if (this.focusDate){
1085
+ this.focusDate = null;
1086
+ this.viewDate = this.dates.get(-1) || this.viewDate;
1087
+ this.fill();
1088
+ }
1089
+ else
1090
+ this.hide();
919
1091
  e.preventDefault();
920
1092
  break;
921
1093
  case 37: // left
922
1094
  case 39: // right
923
1095
  if (!this.o.keyboardNavigation) break;
924
- dir = e.keyCode == 37 ? -1 : 1;
1096
+ dir = e.keyCode === 37 ? -1 : 1;
925
1097
  if (e.ctrlKey){
926
- newDate = this.moveYear(this.date || UTCToday(), dir);
927
- newViewDate = this.moveYear(this.viewDate, dir);
1098
+ newDate = this.moveYear(this.dates.get(-1) || UTCToday(), dir);
1099
+ newViewDate = this.moveYear(focusDate, dir);
928
1100
  this._trigger('changeYear', this.viewDate);
929
1101
  } else if (e.shiftKey){
930
- newDate = this.moveMonth(this.date || UTCToday(), dir);
931
- newViewDate = this.moveMonth(this.viewDate, dir);
1102
+ newDate = this.moveMonth(this.dates.get(-1) || UTCToday(), dir);
1103
+ newViewDate = this.moveMonth(focusDate, dir);
932
1104
  this._trigger('changeMonth', this.viewDate);
933
1105
  } else {
934
- newDate = new Date(this.date || UTCToday());
1106
+ newDate = new Date(this.dates.get(-1) || UTCToday());
935
1107
  newDate.setUTCDate(newDate.getUTCDate() + dir);
936
- newViewDate = new Date(this.viewDate);
937
- newViewDate.setUTCDate(this.viewDate.getUTCDate() + dir);
1108
+ newViewDate = new Date(focusDate);
1109
+ newViewDate.setUTCDate(focusDate.getUTCDate() + dir);
938
1110
  }
939
1111
  if (this.dateWithinRange(newDate)){
940
- this.date = newDate;
941
- this.viewDate = newViewDate;
1112
+ this.focusDate = this.viewDate = newViewDate;
942
1113
  this.setValue();
943
- this.update();
1114
+ this.fill();
944
1115
  e.preventDefault();
945
- dateChanged = true;
946
1116
  }
947
1117
  break;
948
1118
  case 38: // up
949
1119
  case 40: // down
950
1120
  if (!this.o.keyboardNavigation) break;
951
- dir = e.keyCode == 38 ? -1 : 1;
1121
+ dir = e.keyCode === 38 ? -1 : 1;
952
1122
  if (e.ctrlKey){
953
- newDate = this.moveYear(this.date || UTCToday(), dir);
954
- newViewDate = this.moveYear(this.viewDate, dir);
1123
+ newDate = this.moveYear(this.dates.get(-1) || UTCToday(), dir);
1124
+ newViewDate = this.moveYear(focusDate, dir);
955
1125
  this._trigger('changeYear', this.viewDate);
956
1126
  } else if (e.shiftKey){
957
- newDate = this.moveMonth(this.date || UTCToday(), dir);
958
- newViewDate = this.moveMonth(this.viewDate, dir);
1127
+ newDate = this.moveMonth(this.dates.get(-1) || UTCToday(), dir);
1128
+ newViewDate = this.moveMonth(focusDate, dir);
959
1129
  this._trigger('changeMonth', this.viewDate);
960
1130
  } else {
961
- newDate = new Date(this.date || UTCToday());
962
- newDate.setUTCDate(this.date.getUTCDate() + dir * 7);
963
- newViewDate = new Date(this.viewDate);
964
- newViewDate.setUTCDate(this.viewDate.getUTCDate() + dir * 7);
1131
+ newDate = new Date(this.dates.get(-1) || UTCToday());
1132
+ newDate.setUTCDate(newDate.getUTCDate() + dir * 7);
1133
+ newViewDate = new Date(focusDate);
1134
+ newViewDate.setUTCDate(focusDate.getUTCDate() + dir * 7);
965
1135
  }
966
1136
  if (this.dateWithinRange(newDate)){
967
- this.date = newDate;
968
- this.viewDate = newViewDate;
1137
+ this.focusDate = this.viewDate = newViewDate;
969
1138
  this.setValue();
970
- this.update();
1139
+ this.fill();
971
1140
  e.preventDefault();
972
- dateChanged = true;
973
1141
  }
974
1142
  break;
1143
+ case 32: // spacebar
1144
+ // Spacebar is used in manually typing dates in some formats.
1145
+ // As such, its behavior should not be hijacked.
1146
+ break;
975
1147
  case 13: // enter
976
- this.hide();
977
- e.preventDefault();
1148
+ focusDate = this.focusDate || this.dates.get(-1) || this.viewDate;
1149
+ this._toggle_multidate(focusDate);
1150
+ dateChanged = true;
1151
+ this.focusDate = null;
1152
+ this.viewDate = this.dates.get(-1) || this.viewDate;
1153
+ this.setValue();
1154
+ this.fill();
1155
+ if (this.picker.is(':visible')){
1156
+ e.preventDefault();
1157
+ if (this.o.autoclose)
1158
+ this.hide();
1159
+ }
978
1160
  break;
979
1161
  case 9: // tab
1162
+ this.focusDate = null;
1163
+ this.viewDate = this.dates.get(-1) || this.viewDate;
1164
+ this.fill();
980
1165
  this.hide();
981
1166
  break;
982
1167
  }
983
1168
  if (dateChanged){
984
- this._trigger('changeDate');
1169
+ if (this.dates.length)
1170
+ this._trigger('changeDate');
1171
+ else
1172
+ this._trigger('clearDate');
985
1173
  var element;
986
1174
  if (this.isInput) {
987
1175
  element = this.element;
@@ -998,17 +1186,11 @@
998
1186
  if (dir) {
999
1187
  this.viewMode = Math.max(this.o.minViewMode, Math.min(2, this.viewMode + dir));
1000
1188
  }
1001
- /*
1002
- vitalets: fixing bug of very special conditions:
1003
- jquery 1.7.1 + webkit + show inline datepicker in bootstrap popover.
1004
- Method show() does not set display css correctly and datepicker is not shown.
1005
- Changed to .css('display', 'block') solve the problem.
1006
- See https://github.com/vitalets/x-editable/issues/37
1007
-
1008
- In jquery 1.7.2+ everything works fine.
1009
- */
1010
- //this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).show();
1011
- this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).css('display', 'block');
1189
+ this.picker
1190
+ .find('>div')
1191
+ .hide()
1192
+ .filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName)
1193
+ .css('display', 'block');
1012
1194
  this.updateNavArrows();
1013
1195
  }
1014
1196
  };
@@ -1027,7 +1209,7 @@
1027
1209
  };
1028
1210
  DateRangePicker.prototype = {
1029
1211
  updateDates: function(){
1030
- this.dates = $.map(this.pickers, function(i){ return i.date; });
1212
+ this.dates = $.map(this.pickers, function(i){ return i.getUTCDate(); });
1031
1213
  this.updateRanges();
1032
1214
  },
1033
1215
  updateRanges: function(){
@@ -1037,11 +1219,19 @@
1037
1219
  });
1038
1220
  },
1039
1221
  dateUpdated: function(e){
1222
+ // `this.updating` is a workaround for preventing infinite recursion
1223
+ // between `changeDate` triggering and `setUTCDate` calling. Until
1224
+ // there is a better mechanism.
1225
+ if (this.updating)
1226
+ return;
1227
+ this.updating = true;
1228
+
1040
1229
  var dp = $(e.target).data('datepicker'),
1041
1230
  new_date = dp.getUTCDate(),
1042
1231
  i = $.inArray(e.target, this.inputs),
1043
1232
  l = this.inputs.length;
1044
- if (i == -1) return;
1233
+ if (i === -1)
1234
+ return;
1045
1235
 
1046
1236
  $.each(this.pickers, function(i, p){
1047
1237
  if (!p.getUTCDate())
@@ -1061,6 +1251,8 @@
1061
1251
  }
1062
1252
  }
1063
1253
  this.updateDates();
1254
+
1255
+ delete this.updating;
1064
1256
  },
1065
1257
  remove: function(){
1066
1258
  $.map(this.pickers, function(p){ p.remove(); });
@@ -1072,11 +1264,14 @@
1072
1264
  // Derive options from element data-attrs
1073
1265
  var data = $(el).data(),
1074
1266
  out = {}, inkey,
1075
- replace = new RegExp('^' + prefix.toLowerCase() + '([A-Z])'),
1076
- prefix = new RegExp('^' + prefix.toLowerCase());
1267
+ replace = new RegExp('^' + prefix.toLowerCase() + '([A-Z])');
1268
+ prefix = new RegExp('^' + prefix.toLowerCase());
1269
+ function re_lower(_,a){
1270
+ return a.toLowerCase();
1271
+ }
1077
1272
  for (var key in data)
1078
1273
  if (prefix.test(key)){
1079
- inkey = key.replace(replace, function(_,a){ return a.toLowerCase(); });
1274
+ inkey = key.replace(replace, re_lower);
1080
1275
  out[inkey] = data[key];
1081
1276
  }
1082
1277
  return out;
@@ -1108,7 +1303,7 @@
1108
1303
  this.each(function () {
1109
1304
  var $this = $(this),
1110
1305
  data = $this.data('datepicker'),
1111
- options = typeof option == 'object' && option;
1306
+ options = typeof option === 'object' && option;
1112
1307
  if (!data) {
1113
1308
  var elopts = opts_from_el(this, 'date'),
1114
1309
  // Preliminary otions
@@ -1126,7 +1321,7 @@
1126
1321
  $this.data('datepicker', (data = new Datepicker(this, opts)));
1127
1322
  }
1128
1323
  }
1129
- if (typeof option == 'string' && typeof data[option] == 'function') {
1324
+ if (typeof option === 'string' && typeof data[option] === 'function') {
1130
1325
  internal_return = data[option].apply(data, args);
1131
1326
  if (internal_return !== undefined)
1132
1327
  return false;
@@ -1150,6 +1345,8 @@
1150
1345
  keyboardNavigation: true,
1151
1346
  language: 'en',
1152
1347
  minViewMode: 0,
1348
+ multidate: false,
1349
+ multidateSeparator: ',',
1153
1350
  orientation: "auto",
1154
1351
  rtl: false,
1155
1352
  startDate: -Infinity,
@@ -1217,12 +1414,12 @@
1217
1414
  if (date instanceof Date) return date;
1218
1415
  if (typeof format === 'string')
1219
1416
  format = DPGlobal.parseFormat(format);
1417
+ var part_re = /([\-+]\d+)([dmwy])/,
1418
+ parts = date.match(/([\-+]\d+)([dmwy])/g),
1419
+ part, dir, i;
1220
1420
  if (/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(date)) {
1221
- var part_re = /([\-+]\d+)([dmwy])/,
1222
- parts = date.match(/([\-+]\d+)([dmwy])/g),
1223
- part, dir;
1224
1421
  date = new Date();
1225
- for (var i=0; i<parts.length; i++) {
1422
+ for (i=0; i<parts.length; i++) {
1226
1423
  part = part_re.exec(parts[i]);
1227
1424
  dir = parseInt(part[1]);
1228
1425
  switch(part[2]){
@@ -1242,9 +1439,9 @@
1242
1439
  }
1243
1440
  return UTCDate(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 0, 0, 0);
1244
1441
  }
1245
- var parts = date && date.match(this.nonpunctuation) || [],
1246
- date = new Date(),
1247
- parsed = {},
1442
+ parts = date && date.match(this.nonpunctuation) || [];
1443
+ date = new Date();
1444
+ var parsed = {},
1248
1445
  setters_order = ['yyyy', 'yy', 'M', 'MM', 'm', 'mm', 'd', 'dd'],
1249
1446
  setters_map = {
1250
1447
  yyyy: function(d,v){ return d.setUTCFullYear(v); },
@@ -1256,51 +1453,50 @@
1256
1453
  while (v<0) v += 12;
1257
1454
  v %= 12;
1258
1455
  d.setUTCMonth(v);
1259
- while (d.getUTCMonth() != v)
1456
+ while (d.getUTCMonth() !== v)
1260
1457
  d.setUTCDate(d.getUTCDate()-1);
1261
1458
  return d;
1262
1459
  },
1263
1460
  d: function(d,v){ return d.setUTCDate(v); }
1264
1461
  },
1265
- val, filtered, part;
1462
+ val, filtered;
1266
1463
  setters_map['M'] = setters_map['MM'] = setters_map['mm'] = setters_map['m'];
1267
1464
  setters_map['dd'] = setters_map['d'];
1268
1465
  date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0);
1269
1466
  var fparts = format.parts.slice();
1270
1467
  // Remove noop parts
1271
- if (parts.length != fparts.length) {
1468
+ if (parts.length !== fparts.length) {
1272
1469
  fparts = $(fparts).filter(function(i,p){
1273
1470
  return $.inArray(p, setters_order) !== -1;
1274
1471
  }).toArray();
1275
1472
  }
1276
1473
  // Process remainder
1277
- if (parts.length == fparts.length) {
1278
- for (var i=0, cnt = fparts.length; i < cnt; i++) {
1474
+ function match_part(){
1475
+ var m = this.slice(0, parts[i].length),
1476
+ p = parts[i].slice(0, m.length);
1477
+ return m === p;
1478
+ }
1479
+ if (parts.length === fparts.length) {
1480
+ var cnt;
1481
+ for (i=0, cnt = fparts.length; i < cnt; i++) {
1279
1482
  val = parseInt(parts[i], 10);
1280
1483
  part = fparts[i];
1281
1484
  if (isNaN(val)) {
1282
1485
  switch(part) {
1283
1486
  case 'MM':
1284
- filtered = $(dates[language].months).filter(function(){
1285
- var m = this.slice(0, parts[i].length),
1286
- p = parts[i].slice(0, m.length);
1287
- return m == p;
1288
- });
1487
+ filtered = $(dates[language].months).filter(match_part);
1289
1488
  val = $.inArray(filtered[0], dates[language].months) + 1;
1290
1489
  break;
1291
1490
  case 'M':
1292
- filtered = $(dates[language].monthsShort).filter(function(){
1293
- var m = this.slice(0, parts[i].length),
1294
- p = parts[i].slice(0, m.length);
1295
- return m == p;
1296
- });
1491
+ filtered = $(dates[language].monthsShort).filter(match_part);
1297
1492
  val = $.inArray(filtered[0], dates[language].monthsShort) + 1;
1298
1493
  break;
1299
1494
  }
1300
1495
  }
1301
1496
  parsed[part] = val;
1302
1497
  }
1303
- for (var i=0, _date, s; i<setters_order.length; i++){
1498
+ var _date, s;
1499
+ for (i=0; i<setters_order.length; i++){
1304
1500
  s = setters_order[i];
1305
1501
  if (s in parsed && !isNaN(parsed[s])){
1306
1502
  _date = new Date(date);
@@ -1329,8 +1525,8 @@
1329
1525
  };
1330
1526
  val.dd = (val.d < 10 ? '0' : '') + val.d;
1331
1527
  val.mm = (val.m < 10 ? '0' : '') + val.m;
1332
- var date = [],
1333
- seps = $.extend([], format.separators);
1528
+ date = [];
1529
+ var seps = $.extend([], format.separators);
1334
1530
  for (var i=0, cnt = format.parts.length; i <= cnt; i++) {
1335
1531
  if (seps.length)
1336
1532
  date.push(seps.shift());
@@ -1346,7 +1542,14 @@
1346
1542
  '</tr>'+
1347
1543
  '</thead>',
1348
1544
  contTemplate: '<tbody><tr><td colspan="7"></td></tr></tbody>',
1349
- footTemplate: '<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'
1545
+ footTemplate: '<tfoot>'+
1546
+ '<tr>'+
1547
+ '<th colspan="7" class="today"></th>'+
1548
+ '</tr>'+
1549
+ '<tr>'+
1550
+ '<th colspan="7" class="clear"></th>'+
1551
+ '</tr>'+
1552
+ '</tfoot>'
1350
1553
  };
1351
1554
  DPGlobal.template = '<div class="datepicker">'+
1352
1555
  '<div class="datepicker-days">'+
@@ -10,6 +10,7 @@
10
10
  months: ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"],
11
11
  monthsShort: ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"],
12
12
  today: "Oggi",
13
+ clear: "Cancella",
13
14
  weekStart: 1,
14
15
  format: "dd/mm/yyyy"
15
16
  };
@@ -7,10 +7,10 @@
7
7
  $.fn.datepicker.dates['lv'] = {
8
8
  days: ["Svētdiena", "Pirmdiena", "Otrdiena", "Trešdiena", "Ceturtdiena", "Piektdiena", "Sestdiena", "Svētdiena"],
9
9
  daysShort: ["Sv", "P", "O", "T", "C", "Pk", "S", "Sv"],
10
- daysMin: ["Sv", "Pr", "Ot", "Tr", "Ce", "Pk", "St", "Sv"],
10
+ daysMin: ["Sv", "Pr", "Ot", "Tr", "Ce", "Pk", "Se", "Sv"],
11
11
  months: ["Janvāris", "Februāris", "Marts", "Aprīlis", "Maijs", "Jūnijs", "Jūlijs", "Augusts", "Septembris", "Oktobris", "Novembris", "Decembris"],
12
- monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jūn", "Jūl", "Aug", "Sep", "Okt", "Nov", "Dec."],
12
+ monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jūn", "Jūl", "Aug", "Sep", "Okt", "Nov", "Dec"],
13
13
  today: "Šodien",
14
14
  weekStart: 1
15
15
  };
16
- }(jQuery));
16
+ }(jQuery));
@@ -4,11 +4,11 @@
4
4
  */
5
5
  ;(function($){
6
6
  $.fn.datepicker.dates['ua'] = {
7
- days: ["Неділя", "Понеділок", "Вівторок", "Середа", "Четверг", "П'ятница", "Субота", "Неділя"],
7
+ days: ["Неділя", "Понеділок", "Вівторок", "Середа", "Четвер", "П'ятница", "Субота", "Неділя"],
8
8
  daysShort: ["Нед", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Суб", "Нед"],
9
9
  daysMin: ["Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб", "Нд"],
10
10
  months: ["Cічень", "Лютий", "Березень", "Квітень", "Травень", "Червень", "Липень", "Серпень", "Вересень", "Жовтень", "Листопад", "Грудень"],
11
- monthsShort: ["Січ", "Лют", "Бер", "Квт", "Трв", "Чер", "Лип", "Сер", "Вер", "Жов", "Лис", "Грд"],
11
+ monthsShort: ["Січ", "Лют", "Бер", "Кві", "Тра", "Чер", "Лип", "Сер", "Вер", "Жов", "Лис", "Гру"],
12
12
  today: "Сьогодні",
13
13
  weekStart: 1
14
14
  };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Vietnamese translation for bootstrap-datepicker
3
+ * An Vo <https://github.com/anvoz/>
4
+ */
5
+ ;(function($){
6
+ $.fn.datepicker.dates['vi'] = {
7
+ days: ["Chủ nhật", "Thứ hai", "Thứ ba", "Thứ tư", "Thứ năm", "Thứ sáu", "Thứ bảy", "Chủ nhật"],
8
+ daysShort: ["CN", "Thứ 2", "Thứ 3", "Thứ 4", "Thứ 5", "Thứ 6", "Thứ 7", "CN"],
9
+ daysMin: ["CN", "T2", "T3", "T4", "T5", "T6", "T7", "CN"],
10
+ months: ["Tháng 1", "Tháng 2", "Tháng 3", "Tháng 4", "Tháng 5", "Tháng 6", "Tháng 7", "Tháng 8", "Tháng 9", "Tháng 10", "Tháng 11", "Tháng 12"],
11
+ monthsShort: ["Th1", "Th2", "Th3", "Th4", "Th5", "Th6", "Th7", "Th8", "Th9", "Th10", "Th11", "Th12"],
12
+ today: "Hôm nay",
13
+ clear: "Xóa",
14
+ format: "dd/mm/yyyy"
15
+ };
16
+ }(jQuery));
@@ -16,7 +16,6 @@
16
16
  /*.dow {
17
17
  border-top: 1px solid #ddd !important;
18
18
  }*/
19
-
20
19
  }
21
20
  .datepicker-inline {
22
21
  width: 220px;
@@ -113,7 +112,8 @@
113
112
  .table-striped .datepicker table tr th {
114
113
  background-color: transparent;
115
114
  }
116
- .datepicker table tr td.day:hover {
115
+ .datepicker table tr td.day:hover,
116
+ .datepicker table tr td.day.focused {
117
117
  background: #eeeeee;
118
118
  cursor: pointer;
119
119
  }
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.1.1.10
4
+ version: 1.1.1.11
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: 2013-12-01 00:00:00.000000000 Z
11
+ date: 2013-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -101,7 +101,6 @@ files:
101
101
  - vendor/assets/javascripts/bootstrap-datepicker/index.js
102
102
  - vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.ar.js
103
103
  - vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.bg.js
104
- - vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.br.js
105
104
  - vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.ca.js
106
105
  - vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.cs.js
107
106
  - vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.cy.js
@@ -148,6 +147,7 @@ files:
148
147
  - vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.tr.js
149
148
  - vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.ua.js
150
149
  - vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.uk.js
150
+ - vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.vi.js
151
151
  - vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.js
152
152
  - vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.zh-TW.js
153
153
  - vendor/assets/stylesheets/bootstrap-datepicker.css
@@ -1,13 +0,0 @@
1
- /**
2
- * Brazilian translation for bootstrap-datepicker
3
- * Cauan Cabral <cauan@radig.com.br>
4
- */
5
- ;(function($){
6
- $.fn.datepicker.dates['br'] = {
7
- days: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado", "Domingo"],
8
- daysShort: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb", "Dom"],
9
- daysMin: ["Do", "Se", "Te", "Qu", "Qu", "Se", "Sa", "Do"],
10
- months: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"],
11
- monthsShort: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"]
12
- };
13
- }(jQuery));