flatpickr-ce 4.9.0 → 4.10.0

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.
Files changed (99) hide show
  1. package/README.md +31 -0
  2. package/dist/esm/index.js +67 -36
  3. package/dist/esm/l10n/ckb.js +1 -9
  4. package/dist/esm/l10n/fi.js +1 -0
  5. package/dist/esm/l10n/ga.js +1 -1
  6. package/dist/esm/l10n/id.js +1 -1
  7. package/dist/esm/l10n/index.js +4 -0
  8. package/dist/esm/l10n/no.js +1 -1
  9. package/dist/esm/l10n/vn.js +1 -1
  10. package/dist/esm/plugins/momentPlugin.js +1 -1
  11. package/dist/esm/plugins/monthSelect/index.js +13 -9
  12. package/dist/esm/utils/dates.js +8 -3
  13. package/dist/flatpickr.js +113 -40
  14. package/dist/flatpickr.min.js +2 -2
  15. package/dist/l10n/ar-dz.d.ts +3 -0
  16. package/dist/l10n/ar.d.ts +3 -0
  17. package/dist/l10n/at.d.ts +3 -0
  18. package/dist/l10n/az.d.ts +3 -0
  19. package/dist/l10n/be.d.ts +3 -0
  20. package/dist/l10n/bg.d.ts +3 -0
  21. package/dist/l10n/bn.d.ts +3 -0
  22. package/dist/l10n/br.d.ts +3 -0
  23. package/dist/l10n/bs.d.ts +3 -0
  24. package/dist/l10n/cat.d.ts +3 -0
  25. package/dist/l10n/ckb.d.ts +3 -0
  26. package/dist/l10n/ckb.js +1 -9
  27. package/dist/l10n/cs.d.ts +3 -0
  28. package/dist/l10n/cy.d.ts +3 -0
  29. package/dist/l10n/da.d.ts +3 -0
  30. package/dist/l10n/de.d.ts +3 -0
  31. package/dist/l10n/eo.d.ts +3 -0
  32. package/dist/l10n/es.d.ts +3 -0
  33. package/dist/l10n/et.d.ts +3 -0
  34. package/dist/l10n/fa.d.ts +3 -0
  35. package/dist/l10n/fi.d.ts +3 -0
  36. package/dist/l10n/fi.js +1 -0
  37. package/dist/l10n/fo.d.ts +3 -0
  38. package/dist/l10n/fr.d.ts +3 -0
  39. package/dist/l10n/ga.d.ts +3 -0
  40. package/dist/l10n/ga.js +1 -1
  41. package/dist/l10n/gl.d.ts +3 -0
  42. package/dist/l10n/gr.d.ts +3 -0
  43. package/dist/l10n/he.d.ts +3 -0
  44. package/dist/l10n/hi.d.ts +3 -0
  45. package/dist/l10n/hr.d.ts +3 -0
  46. package/dist/l10n/hu.d.ts +3 -0
  47. package/dist/l10n/hy.d.ts +3 -0
  48. package/dist/l10n/id.d.ts +3 -0
  49. package/dist/l10n/id.js +1 -1
  50. package/dist/l10n/index.js +191 -141
  51. package/dist/l10n/is.d.ts +3 -0
  52. package/dist/l10n/it.d.ts +3 -0
  53. package/dist/l10n/ja.d.ts +3 -0
  54. package/dist/l10n/ka.d.ts +3 -0
  55. package/dist/l10n/km.d.ts +3 -0
  56. package/dist/l10n/ko.d.ts +3 -0
  57. package/dist/l10n/kz.d.ts +3 -0
  58. package/dist/l10n/lt.d.ts +3 -0
  59. package/dist/l10n/lv.d.ts +3 -0
  60. package/dist/l10n/mk.d.ts +3 -0
  61. package/dist/l10n/mn.d.ts +3 -0
  62. package/dist/l10n/ms.d.ts +3 -0
  63. package/dist/l10n/my.d.ts +3 -0
  64. package/dist/l10n/nl.d.ts +3 -0
  65. package/dist/l10n/nn.d.ts +3 -0
  66. package/dist/l10n/no.d.ts +3 -0
  67. package/dist/l10n/no.js +1 -1
  68. package/dist/l10n/pa.d.ts +3 -0
  69. package/dist/l10n/pl.d.ts +3 -0
  70. package/dist/l10n/pt.d.ts +3 -0
  71. package/dist/l10n/ro.d.ts +3 -0
  72. package/dist/l10n/ru.d.ts +3 -0
  73. package/dist/l10n/si.d.ts +3 -0
  74. package/dist/l10n/sk.d.ts +3 -0
  75. package/dist/l10n/sl.d.ts +3 -0
  76. package/dist/l10n/sq.d.ts +3 -0
  77. package/dist/l10n/sr-cyr.d.ts +3 -0
  78. package/dist/l10n/sr.d.ts +3 -0
  79. package/dist/l10n/sv.d.ts +3 -0
  80. package/dist/l10n/tg.d.ts +3 -0
  81. package/dist/l10n/th.d.ts +3 -0
  82. package/dist/l10n/tr.d.ts +3 -0
  83. package/dist/l10n/uk.d.ts +3 -0
  84. package/dist/l10n/uz.d.ts +3 -0
  85. package/dist/l10n/uz_latn.d.ts +3 -0
  86. package/dist/l10n/vn.d.ts +3 -0
  87. package/dist/l10n/vn.js +1 -1
  88. package/dist/l10n/zh.d.ts +3 -0
  89. package/dist/l10n/zh_tw.d.ts +3 -0
  90. package/dist/plugins/momentPlugin.js +1 -1
  91. package/dist/plugins/monthSelect/index.js +17 -10
  92. package/dist/themes/airbnb.css +9 -10
  93. package/dist/types/instance.d.ts +1 -0
  94. package/dist/types/locale.d.ts +1 -1
  95. package/dist/types/options.d.ts +2 -0
  96. package/dist/typings.d.ts +1 -1
  97. package/dist/utils/dates.d.ts +1 -1
  98. package/package.json +1 -1
  99. package/src/style/themes/airbnb.styl +4 -8
package/dist/l10n/sv.d.ts CHANGED
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  fi?: CustomLocale | undefined;
26
26
  fo?: CustomLocale | undefined;
27
27
  fr?: CustomLocale | undefined;
28
+ ga?: CustomLocale | undefined;
28
29
  gl?: CustomLocale | undefined;
29
30
  gr?: CustomLocale | undefined;
30
31
  he?: CustomLocale | undefined;
@@ -47,6 +48,7 @@ declare const _default: {
47
48
  ms?: CustomLocale | undefined;
48
49
  my?: CustomLocale | undefined;
49
50
  nl?: CustomLocale | undefined;
51
+ nb?: CustomLocale | undefined;
50
52
  nn?: CustomLocale | undefined;
51
53
  no?: CustomLocale | undefined;
52
54
  pa?: CustomLocale | undefined;
@@ -64,6 +66,7 @@ declare const _default: {
64
66
  th?: CustomLocale | undefined;
65
67
  tr?: CustomLocale | undefined;
66
68
  uk?: CustomLocale | undefined;
69
+ vi?: CustomLocale | undefined;
67
70
  vn?: CustomLocale | undefined;
68
71
  zh?: CustomLocale | undefined;
69
72
  uz?: CustomLocale | undefined;
package/dist/l10n/tg.d.ts CHANGED
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  fi?: CustomLocale | undefined;
26
26
  fo?: CustomLocale | undefined;
27
27
  fr?: CustomLocale | undefined;
28
+ ga?: CustomLocale | undefined;
28
29
  gl?: CustomLocale | undefined;
29
30
  gr?: CustomLocale | undefined;
30
31
  he?: CustomLocale | undefined;
@@ -47,6 +48,7 @@ declare const _default: {
47
48
  ms?: CustomLocale | undefined;
48
49
  my?: CustomLocale | undefined;
49
50
  nl?: CustomLocale | undefined;
51
+ nb?: CustomLocale | undefined;
50
52
  nn?: CustomLocale | undefined;
51
53
  no?: CustomLocale | undefined;
52
54
  pa?: CustomLocale | undefined;
@@ -64,6 +66,7 @@ declare const _default: {
64
66
  th?: CustomLocale | undefined;
65
67
  tr?: CustomLocale | undefined;
66
68
  uk?: CustomLocale | undefined;
69
+ vi?: CustomLocale | undefined;
67
70
  vn?: CustomLocale | undefined;
68
71
  zh?: CustomLocale | undefined;
69
72
  uz?: CustomLocale | undefined;
package/dist/l10n/th.d.ts CHANGED
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  fi?: CustomLocale | undefined;
26
26
  fo?: CustomLocale | undefined;
27
27
  fr?: CustomLocale | undefined;
28
+ ga?: CustomLocale | undefined;
28
29
  gl?: CustomLocale | undefined;
29
30
  gr?: CustomLocale | undefined;
30
31
  he?: CustomLocale | undefined;
@@ -47,6 +48,7 @@ declare const _default: {
47
48
  ms?: CustomLocale | undefined;
48
49
  my?: CustomLocale | undefined;
49
50
  nl?: CustomLocale | undefined;
51
+ nb?: CustomLocale | undefined;
50
52
  nn?: CustomLocale | undefined;
51
53
  no?: CustomLocale | undefined;
52
54
  pa?: CustomLocale | undefined;
@@ -64,6 +66,7 @@ declare const _default: {
64
66
  th?: CustomLocale | undefined;
65
67
  tr?: CustomLocale | undefined;
66
68
  uk?: CustomLocale | undefined;
69
+ vi?: CustomLocale | undefined;
67
70
  vn?: CustomLocale | undefined;
68
71
  zh?: CustomLocale | undefined;
69
72
  uz?: CustomLocale | undefined;
package/dist/l10n/tr.d.ts CHANGED
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  fi?: CustomLocale | undefined;
26
26
  fo?: CustomLocale | undefined;
27
27
  fr?: CustomLocale | undefined;
28
+ ga?: CustomLocale | undefined;
28
29
  gl?: CustomLocale | undefined;
29
30
  gr?: CustomLocale | undefined;
30
31
  he?: CustomLocale | undefined;
@@ -47,6 +48,7 @@ declare const _default: {
47
48
  ms?: CustomLocale | undefined;
48
49
  my?: CustomLocale | undefined;
49
50
  nl?: CustomLocale | undefined;
51
+ nb?: CustomLocale | undefined;
50
52
  nn?: CustomLocale | undefined;
51
53
  no?: CustomLocale | undefined;
52
54
  pa?: CustomLocale | undefined;
@@ -64,6 +66,7 @@ declare const _default: {
64
66
  th?: CustomLocale | undefined;
65
67
  tr?: CustomLocale | undefined;
66
68
  uk?: CustomLocale | undefined;
69
+ vi?: CustomLocale | undefined;
67
70
  vn?: CustomLocale | undefined;
68
71
  zh?: CustomLocale | undefined;
69
72
  uz?: CustomLocale | undefined;
package/dist/l10n/uk.d.ts CHANGED
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  fi?: CustomLocale | undefined;
26
26
  fo?: CustomLocale | undefined;
27
27
  fr?: CustomLocale | undefined;
28
+ ga?: CustomLocale | undefined;
28
29
  gl?: CustomLocale | undefined;
29
30
  gr?: CustomLocale | undefined;
30
31
  he?: CustomLocale | undefined;
@@ -47,6 +48,7 @@ declare const _default: {
47
48
  ms?: CustomLocale | undefined;
48
49
  my?: CustomLocale | undefined;
49
50
  nl?: CustomLocale | undefined;
51
+ nb?: CustomLocale | undefined;
50
52
  nn?: CustomLocale | undefined;
51
53
  no?: CustomLocale | undefined;
52
54
  pa?: CustomLocale | undefined;
@@ -64,6 +66,7 @@ declare const _default: {
64
66
  th?: CustomLocale | undefined;
65
67
  tr?: CustomLocale | undefined;
66
68
  uk?: CustomLocale | undefined;
69
+ vi?: CustomLocale | undefined;
67
70
  vn?: CustomLocale | undefined;
68
71
  zh?: CustomLocale | undefined;
69
72
  uz?: CustomLocale | undefined;
package/dist/l10n/uz.d.ts CHANGED
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  fi?: CustomLocale | undefined;
26
26
  fo?: CustomLocale | undefined;
27
27
  fr?: CustomLocale | undefined;
28
+ ga?: CustomLocale | undefined;
28
29
  gl?: CustomLocale | undefined;
29
30
  gr?: CustomLocale | undefined;
30
31
  he?: CustomLocale | undefined;
@@ -47,6 +48,7 @@ declare const _default: {
47
48
  ms?: CustomLocale | undefined;
48
49
  my?: CustomLocale | undefined;
49
50
  nl?: CustomLocale | undefined;
51
+ nb?: CustomLocale | undefined;
50
52
  nn?: CustomLocale | undefined;
51
53
  no?: CustomLocale | undefined;
52
54
  pa?: CustomLocale | undefined;
@@ -64,6 +66,7 @@ declare const _default: {
64
66
  th?: CustomLocale | undefined;
65
67
  tr?: CustomLocale | undefined;
66
68
  uk?: CustomLocale | undefined;
69
+ vi?: CustomLocale | undefined;
67
70
  vn?: CustomLocale | undefined;
68
71
  zh?: CustomLocale | undefined;
69
72
  uz?: CustomLocale | undefined;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  fi?: CustomLocale | undefined;
26
26
  fo?: CustomLocale | undefined;
27
27
  fr?: CustomLocale | undefined;
28
+ ga?: CustomLocale | undefined;
28
29
  gl?: CustomLocale | undefined;
29
30
  gr?: CustomLocale | undefined;
30
31
  he?: CustomLocale | undefined;
@@ -47,6 +48,7 @@ declare const _default: {
47
48
  ms?: CustomLocale | undefined;
48
49
  my?: CustomLocale | undefined;
49
50
  nl?: CustomLocale | undefined;
51
+ nb?: CustomLocale | undefined;
50
52
  nn?: CustomLocale | undefined;
51
53
  no?: CustomLocale | undefined;
52
54
  pa?: CustomLocale | undefined;
@@ -64,6 +66,7 @@ declare const _default: {
64
66
  th?: CustomLocale | undefined;
65
67
  tr?: CustomLocale | undefined;
66
68
  uk?: CustomLocale | undefined;
69
+ vi?: CustomLocale | undefined;
67
70
  vn?: CustomLocale | undefined;
68
71
  zh?: CustomLocale | undefined;
69
72
  uz?: CustomLocale | undefined;
package/dist/l10n/vn.d.ts CHANGED
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  fi?: CustomLocale | undefined;
26
26
  fo?: CustomLocale | undefined;
27
27
  fr?: CustomLocale | undefined;
28
+ ga?: CustomLocale | undefined;
28
29
  gl?: CustomLocale | undefined;
29
30
  gr?: CustomLocale | undefined;
30
31
  he?: CustomLocale | undefined;
@@ -47,6 +48,7 @@ declare const _default: {
47
48
  ms?: CustomLocale | undefined;
48
49
  my?: CustomLocale | undefined;
49
50
  nl?: CustomLocale | undefined;
51
+ nb?: CustomLocale | undefined;
50
52
  nn?: CustomLocale | undefined;
51
53
  no?: CustomLocale | undefined;
52
54
  pa?: CustomLocale | undefined;
@@ -64,6 +66,7 @@ declare const _default: {
64
66
  th?: CustomLocale | undefined;
65
67
  tr?: CustomLocale | undefined;
66
68
  uk?: CustomLocale | undefined;
69
+ vi?: CustomLocale | undefined;
67
70
  vn?: CustomLocale | undefined;
68
71
  zh?: CustomLocale | undefined;
69
72
  uz?: CustomLocale | undefined;
package/dist/l10n/vn.js CHANGED
@@ -55,7 +55,7 @@
55
55
  firstDayOfWeek: 1,
56
56
  rangeSeparator: " đến ",
57
57
  };
58
- fp.l10ns.vn = Vietnamese;
58
+ fp.l10ns.vn = fp.l10ns.vi = Vietnamese;
59
59
  var vn = fp.l10ns;
60
60
 
61
61
  exports.Vietnamese = Vietnamese;
package/dist/l10n/zh.d.ts CHANGED
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  fi?: CustomLocale | undefined;
26
26
  fo?: CustomLocale | undefined;
27
27
  fr?: CustomLocale | undefined;
28
+ ga?: CustomLocale | undefined;
28
29
  gl?: CustomLocale | undefined;
29
30
  gr?: CustomLocale | undefined;
30
31
  he?: CustomLocale | undefined;
@@ -47,6 +48,7 @@ declare const _default: {
47
48
  ms?: CustomLocale | undefined;
48
49
  my?: CustomLocale | undefined;
49
50
  nl?: CustomLocale | undefined;
51
+ nb?: CustomLocale | undefined;
50
52
  nn?: CustomLocale | undefined;
51
53
  no?: CustomLocale | undefined;
52
54
  pa?: CustomLocale | undefined;
@@ -64,6 +66,7 @@ declare const _default: {
64
66
  th?: CustomLocale | undefined;
65
67
  tr?: CustomLocale | undefined;
66
68
  uk?: CustomLocale | undefined;
69
+ vi?: CustomLocale | undefined;
67
70
  vn?: CustomLocale | undefined;
68
71
  zh?: CustomLocale | undefined;
69
72
  uz?: CustomLocale | undefined;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  fi?: CustomLocale | undefined;
26
26
  fo?: CustomLocale | undefined;
27
27
  fr?: CustomLocale | undefined;
28
+ ga?: CustomLocale | undefined;
28
29
  gl?: CustomLocale | undefined;
29
30
  gr?: CustomLocale | undefined;
30
31
  he?: CustomLocale | undefined;
@@ -47,6 +48,7 @@ declare const _default: {
47
48
  ms?: CustomLocale | undefined;
48
49
  my?: CustomLocale | undefined;
49
50
  nl?: CustomLocale | undefined;
51
+ nb?: CustomLocale | undefined;
50
52
  nn?: CustomLocale | undefined;
51
53
  no?: CustomLocale | undefined;
52
54
  pa?: CustomLocale | undefined;
@@ -64,6 +66,7 @@ declare const _default: {
64
66
  th?: CustomLocale | undefined;
65
67
  tr?: CustomLocale | undefined;
66
68
  uk?: CustomLocale | undefined;
69
+ vi?: CustomLocale | undefined;
67
70
  vn?: CustomLocale | undefined;
68
71
  zh?: CustomLocale | undefined;
69
72
  uz?: CustomLocale | undefined;
@@ -28,7 +28,7 @@
28
28
  var unit = Array.from(input.classList)
29
29
  .filter(function (name) { return name.startsWith("flatpickr-"); })
30
30
  .map(function (name) { return name.substring(10); })[0];
31
- var step = parseFloat(input.getAttribute("step"));
31
+ var step = fp._getIncrement(input);
32
32
  date.add(step * event.delta, unit);
33
33
  fp.setDate(date.toDate());
34
34
  }
@@ -127,14 +127,11 @@
127
127
  return;
128
128
  buildMonths();
129
129
  // createDay only marks selected dates that fall on the 1st, so mark the
130
- // month of the first selected date instead
131
- var selected = self.monthsContainer.querySelectorAll(".selected");
132
- for (var index = 0; index < selected.length; index++) {
133
- selected[index].classList.remove("selected");
134
- }
135
- var selectedDate = fp.selectedDates[0];
136
- if (selectedDate && selectedDate.getFullYear() === fp.currentYear) {
137
- self.monthsContainer.children[selectedDate.getMonth()].classList.add("selected");
130
+ // month of every selected date in the year shown
131
+ for (var _i = 0, _a = fp.selectedDates; _i < _a.length; _i++) {
132
+ var date = _a[_i];
133
+ if (date.getFullYear() === fp.currentYear)
134
+ self.monthsContainer.children[date.getMonth()].classList.add("selected");
138
135
  }
139
136
  }
140
137
  function selectMonth(e) {
@@ -160,14 +157,21 @@
160
157
  return;
161
158
  // setDate rebuilds the month cells, so carry the focus over to the new one
162
159
  var focusedIndex = Array.prototype.indexOf.call(self.monthsContainer.children, document.activeElement);
163
- var selectedDate = new Date(fp.currentYear, date.getMonth(), date.getDate());
160
+ var month = date.getMonth();
161
+ var selectedDate = new Date(fp.currentYear, month, date.getDate());
162
+ var isInMonth = function (d) {
163
+ return d.getFullYear() === fp.currentYear && d.getMonth() === month;
164
+ };
164
165
  var selectedDates = [];
165
166
  switch (fp.config.mode) {
166
167
  case "single":
167
168
  selectedDates = [selectedDate];
168
169
  break;
169
170
  case "multiple":
170
- selectedDates.push(selectedDate);
171
+ // picking a month again unselects it, whatever the day selected
172
+ selectedDates = fp.selectedDates.filter(function (d) { return !isInMonth(d); });
173
+ if (selectedDates.length === fp.selectedDates.length)
174
+ selectedDates.push(selectedDate);
171
175
  break;
172
176
  case "range":
173
177
  if (fp.selectedDates.length === 2) {
@@ -180,6 +184,9 @@
180
184
  break;
181
185
  }
182
186
  fp.setDate(selectedDates, true);
187
+ // setDate shows the last selected date; stay on the year picked, as a
188
+ // click on a day does, and tell onYearChange where the view ends up
189
+ fp.jumpToDate(selectedDate, true);
183
190
  if (focusedIndex !== -1)
184
191
  self.monthsContainer.children[focusedIndex].focus();
185
192
  }
@@ -876,13 +876,12 @@ span.flatpickr-day.nextMonthDay.selected {
876
876
  .hasWeeks .flatpickr-days {
877
877
  border-right: 0;
878
878
  }
879
-
880
- @media screen and (min-width:0\0) and (min-resolution: +72dpi) {
881
- span.flatpickr-day {
882
- display: block;
883
- -webkit-box-flex: 1;
884
- -webkit-flex: 1 0 auto;
885
- -ms-flex: 1 0 auto;
886
- flex: 1 0 auto;
887
- }
888
- }
879
+ @media screen and (-ms-high-contrast: none), screen and (-ms-high-contrast: active) {
880
+ span.flatpickr-day {
881
+ display: block;
882
+ -webkit-box-flex: 1;
883
+ -webkit-flex: 1 0 auto;
884
+ -ms-flex: 1 0 auto;
885
+ flex: 1 0 auto;
886
+ }
887
+ }
@@ -94,6 +94,7 @@ export declare type Instance = Elements & Formatting & {
94
94
  _positionCalendar: (customPositionElement?: HTMLElement) => void;
95
95
  _showValue: () => void;
96
96
  _typedValue: () => string | undefined;
97
+ _getIncrement: (input: HTMLInputElement) => number;
97
98
  utils: {
98
99
  getDaysInMonth: (month?: number, year?: number) => number;
99
100
  };
@@ -109,4 +109,4 @@ export declare type CustomLocale = {
109
109
  ];
110
110
  };
111
111
  };
112
- export declare type key = "ar" | "at" | "az" | "be" | "bg" | "bn" | "br" | "bs" | "ca" | "cat" | "ckb" | "cs" | "cy" | "da" | "de" | "default" | "en" | "eo" | "es" | "et" | "fa" | "fi" | "fo" | "fr" | "gl" | "gr" | "he" | "hi" | "hr" | "hu" | "hy" | "id" | "is" | "it" | "ja" | "ka" | "ko" | "km" | "kz" | "lt" | "lv" | "mk" | "mn" | "ms" | "my" | "nl" | "nn" | "no" | "pa" | "pl" | "pt" | "ro" | "ru" | "si" | "sk" | "sl" | "sq" | "sr" | "sv" | "tg" | "th" | "tr" | "uk" | "vn" | "zh" | "uz" | "uz_latn" | "zh_tw";
112
+ export declare type key = "ar" | "at" | "az" | "be" | "bg" | "bn" | "br" | "bs" | "ca" | "cat" | "ckb" | "cs" | "cy" | "da" | "de" | "default" | "en" | "eo" | "es" | "et" | "fa" | "fi" | "fo" | "fr" | "ga" | "gl" | "gr" | "he" | "hi" | "hr" | "hu" | "hy" | "id" | "is" | "it" | "ja" | "ka" | "ko" | "km" | "kz" | "lt" | "lv" | "mk" | "mn" | "ms" | "my" | "nl" | "nb" | "nn" | "no" | "pa" | "pl" | "pt" | "ro" | "ru" | "si" | "sk" | "sl" | "sq" | "sr" | "sv" | "tg" | "th" | "tr" | "uk" | "vi" | "vn" | "zh" | "uz" | "uz_latn" | "zh_tw";
@@ -68,6 +68,7 @@ export interface BaseOptions {
68
68
  position: "auto" | "above" | "below" | "auto left" | "auto center" | "auto right" | "above left" | "above center" | "above right" | "below left" | "below center" | "below right" | ((self: Instance, customElement: HTMLElement | undefined) => void);
69
69
  positionElement: Element;
70
70
  prevArrow: string;
71
+ secondIncrement: number;
71
72
  shorthandCurrentMonth: boolean;
72
73
  static: boolean;
73
74
  showMonths?: number;
@@ -140,6 +141,7 @@ export interface ParsedOptions {
140
141
  position: BaseOptions["position"];
141
142
  positionElement?: HTMLElement;
142
143
  prevArrow: string;
144
+ secondIncrement?: number;
143
145
  shorthandCurrentMonth: boolean;
144
146
  showMonths: number;
145
147
  static: boolean;
package/dist/typings.d.ts CHANGED
@@ -37,4 +37,4 @@ declare namespace flatpickr {
37
37
  }
38
38
  }
39
39
 
40
- export default flatpickr;
40
+ export = flatpickr;
@@ -18,7 +18,7 @@ export declare const parseSeconds: (secondsSinceMidnight: number) => number[];
18
18
  export declare const duration: {
19
19
  DAY: number;
20
20
  };
21
- export declare function getDefaultHours(config: ParsedOptions): {
21
+ export declare function getDefaultHours(config: ParsedOptions, date: Date): {
22
22
  hours: number;
23
23
  minutes: number;
24
24
  seconds: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatpickr-ce",
3
- "version": "4.9.0",
3
+ "version": "4.10.0",
4
4
  "description": "A lightweight, powerful javascript datetime picker",
5
5
  "scripts": {
6
6
  "build": "run-s build:pre build:build build:esm build:types build:post",
@@ -77,11 +77,7 @@ span.flatpickr-day
77
77
  .hasWeeks .flatpickr-days
78
78
  border-right 0
79
79
 
80
- @css {
81
- @media screen and (min-width:0\0) and (min-resolution: +72dpi) {
82
- span.flatpickr-day {
83
- display: block;
84
- flex: 1 0 auto;
85
- }
86
- }
87
- }
80
+ @media screen and (-ms-high-contrast: none), screen and (-ms-high-contrast: active)
81
+ span.flatpickr-day
82
+ display block
83
+ flex 1 0 auto