Permalink
Browse files

Merge latest master into range branch

  • Loading branch information...
2 parents fdd23a3 + dfb6b64 commit aa5f114c721e0d2269849b917ce94b9127c22d78 @eternicode eternicode committed Sep 28, 2012
Showing with 4,463 additions and 209 deletions.
  1. +2 −0 .gitignore
  2. +2 −0 .hgignore
  3. +33 −3 README.md
  4. +1 −0 build/build.less
  5. +55 −5 css/datepicker.css
  6. +259 −186 js/bootstrap-datepicker.js
  7. +2 −1 js/locales/bootstrap-datepicker.br.js
  8. +14 −0 js/locales/bootstrap-datepicker.cs.js
  9. +2 −1 js/locales/bootstrap-datepicker.da.js
  10. +2 −1 js/locales/bootstrap-datepicker.de.js
  11. +2 −1 js/locales/bootstrap-datepicker.es.js
  12. +14 −0 js/locales/bootstrap-datepicker.fi.js
  13. +2 −1 js/locales/bootstrap-datepicker.fr.js
  14. +13 −0 js/locales/bootstrap-datepicker.id.js
  15. +2 −1 js/locales/bootstrap-datepicker.is.js
  16. +2 −1 js/locales/bootstrap-datepicker.it.js
  17. +13 −0 js/locales/bootstrap-datepicker.ja.js
  18. +13 −0 js/locales/bootstrap-datepicker.kr.js
  19. +15 −0 js/locales/bootstrap-datepicker.lt.js
  20. +16 −0 js/locales/bootstrap-datepicker.lv.js
  21. +14 −0 js/locales/bootstrap-datepicker.ms.js
  22. +14 −0 js/locales/bootstrap-datepicker.nb.js
  23. +2 −1 js/locales/bootstrap-datepicker.nl.js
  24. +14 −0 js/locales/bootstrap-datepicker.pl.js
  25. +14 −0 js/locales/bootstrap-datepicker.pt.js
  26. +2 −1 js/locales/bootstrap-datepicker.ru.js
  27. +2 −1 js/locales/bootstrap-datepicker.sv.js
  28. +14 −0 js/locales/bootstrap-datepicker.th.js
  29. +2 −1 js/locales/bootstrap-datepicker.tr.js
  30. +14 −0 js/locales/bootstrap-datepicker.zh-CN.js
  31. +13 −0 js/locales/bootstrap-datepicker.zh-TW.js
  32. +11 −4 less/datepicker.less
  33. +55 −0 tests/README.md
  34. +26 −0 tests/_coverage.html
  35. +48 −0 tests/assets/coverage.js
  36. +4 −0 tests/assets/jquery-1.7.1.min.js
  37. +26 −0 tests/assets/mock.js
  38. +29 −0 tests/assets/qunit-logging.js
  39. +235 −0 tests/assets/qunit.css
  40. +1,669 −0 tests/assets/qunit.js
  41. +21 −0 tests/assets/utils.js
  42. +157 −0 tests/run-qunit.js
  43. +157 −0 tests/suites/component.js
  44. +80 −0 tests/suites/events.js
  45. +195 −0 tests/suites/formats.js
  46. +86 −0 tests/suites/keyboard_navigation/2011.js
  47. +410 −0 tests/suites/keyboard_navigation/2012.js
  48. +26 −0 tests/suites/keyboard_navigation/all.js
  49. +66 −0 tests/suites/mouse_navigation/2011.js
  50. +251 −0 tests/suites/mouse_navigation/2012.js
  51. +33 −0 tests/suites/mouse_navigation/all.js
  52. +264 −0 tests/suites/options.js
  53. +45 −0 tests/tests.html
View
@@ -0,0 +1,2 @@
+instrumented/
+tests/coverage.html
View
@@ -0,0 +1,2 @@
+instrumented/
+tests/coverage.html
View
@@ -1,12 +1,16 @@
# Home
-http://www.eyecon.ro/bootstrap-datepicker/
+This is a fork of Stefan Petre's [original code](http://www.eyecon.ro/bootstrap-datepicker/);
+thanks go to him for getting this thing started!
+
+Please note that this fork is not used on Stefan's page at this time, nor is it maintained or
+contributed to by him (yet?)
# Example
Attached to a field with the format specified via options:
- <input type="text" value="02-16-2012" id="datepicker">
+ <input type="text" value="02-16-2012" id="datepicker">
######
$('#datepicker').datepicker({
format: 'mm-dd-yyyy'
@@ -104,7 +108,7 @@ All options that take a "Date" can handle a `Date` object; a String formatted ac
String. Default: 'mm/dd/yyyy'
-The date format, combination of d, dd, m, mm, M, MM, yy, yyy.
+The date format, combination of d, dd, m, mm, M, MM, yy, yyyy.
### weekStart
@@ -136,6 +140,24 @@ Number, String. Default: 0, 'month'
The view that the datepicker should show when it is opened. Accepts values of 0 or 'month' for month view (the default), 1 or 'year' for the 12-month overview, and 2 or 'decade' for the 10-year overview. Useful for date-of-birth datepickers.
+### todayBtn
+
+Boolean, "linked". Default: false
+
+If true or "linked", displays a "Today" button at the bottom of the datepicker to select the current date. If true, the "Today" button will only move the current date into view; if "linked", the current date will also be selected.
+
+### todayHighlight
+
+Boolean. Default: false
+
+If true, highlights the current date.
+
+### keyboardNavigation
+
+Boolean. Default: true
+
+Whether or not to allow date navigation by arrow keys.
+
### language
String. Default: 'en'
@@ -244,6 +266,14 @@ Fired when the date is changed.
}
});
+### changeYear
+
+Fired when the *view* year is changed from decade view.
+
+### changeMonth
+
+Fired when the *view* month is changed from year view.
+
## Keyboard support
The datepicker includes some keyboard navigation:
View
@@ -12,6 +12,7 @@
@white: #fff;
@linkColor: #08c;
@btnPrimaryBackground: @linkColor;
+@orange: #f89406;
@baseLineHeight: 18px;
// Mixins
View
@@ -54,7 +54,6 @@
display: block;
}
.datepicker table {
- width: 100%;
margin: 0;
}
.datepicker td,
@@ -130,6 +129,55 @@
.datepicker td.selected.disabled:hover[disabled] {
background-color: #808080;
}
+.datepicker td.today,
+.datepicker td.today:hover,
+.datepicker td.today.disabled,
+.datepicker td.today.disabled:hover {
+ background-color: #fde19a;
+ background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a);
+ background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a));
+ background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a);
+ background-image: -o-linear-gradient(top, #fdd49a, #fdf59a);
+ background-image: linear-gradient(top, #fdd49a, #fdf59a);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0);
+ border-color: #fdf59a #fdf59a #fbed50;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter: progid:dximagetransform.microsoft.gradient(enabled=false);
+}
+.datepicker td.today:hover,
+.datepicker td.today:hover:hover,
+.datepicker td.today.disabled:hover,
+.datepicker td.today.disabled:hover:hover,
+.datepicker td.today:active,
+.datepicker td.today:hover:active,
+.datepicker td.today.disabled:active,
+.datepicker td.today.disabled:hover:active,
+.datepicker td.today.active,
+.datepicker td.today:hover.active,
+.datepicker td.today.disabled.active,
+.datepicker td.today.disabled:hover.active,
+.datepicker td.today.disabled,
+.datepicker td.today:hover.disabled,
+.datepicker td.today.disabled.disabled,
+.datepicker td.today.disabled:hover.disabled,
+.datepicker td.today[disabled],
+.datepicker td.today:hover[disabled],
+.datepicker td.today.disabled[disabled],
+.datepicker td.today.disabled:hover[disabled] {
+ background-color: #fdf59a;
+}
+.datepicker td.today:active,
+.datepicker td.today:hover:active,
+.datepicker td.today.disabled:active,
+.datepicker td.today.disabled:hover:active,
+.datepicker td.today.active,
+.datepicker td.today:hover.active,
+.datepicker td.today.disabled.active,
+.datepicker td.today.disabled:hover.active {
+ background-color: #fbf069 \9;
+}
.datepicker td.selected:active,
.datepicker td.selected:hover:active,
.datepicker td.selected.disabled:active,
@@ -193,11 +241,11 @@
}
.datepicker td span {
display: block;
- width: 47px;
+ width: 23%;
height: 54px;
line-height: 54px;
float: left;
- margin: 2px;
+ margin: 1%;
cursor: pointer;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
@@ -269,10 +317,12 @@
.datepicker th.switch {
width: 145px;
}
-.datepicker thead tr:first-child th {
+.datepicker thead tr:first-child th,
+.datepicker tfoot tr:first-child th {
cursor: pointer;
}
-.datepicker thead tr:first-child th:hover {
+.datepicker thead tr:first-child th:hover,
+.datepicker tfoot tr:first-child th:hover {
background: #eeeeee;
}
.input-append.date .add-on i,
Oops, something went wrong. Retry.

0 comments on commit aa5f114

Please sign in to comment.