@fullcalendar/core 6.1.15 → 6.1.18

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 (170) hide show
  1. package/index.cjs +91 -21
  2. package/index.global.js +189 -90
  3. package/index.global.min.js +2 -2
  4. package/index.js +92 -22
  5. package/internal-common.cjs +147 -121
  6. package/internal-common.d.ts +20 -5
  7. package/internal-common.js +148 -119
  8. package/internal.js +1 -1
  9. package/locales/af.global.js +1 -1
  10. package/locales/af.global.min.js +1 -1
  11. package/locales/ar-dz.global.js +1 -1
  12. package/locales/ar-dz.global.min.js +1 -1
  13. package/locales/ar-kw.global.js +1 -1
  14. package/locales/ar-kw.global.min.js +1 -1
  15. package/locales/ar-ly.global.js +1 -1
  16. package/locales/ar-ly.global.min.js +1 -1
  17. package/locales/ar-ma.global.js +1 -1
  18. package/locales/ar-ma.global.min.js +1 -1
  19. package/locales/ar-sa.global.js +1 -1
  20. package/locales/ar-sa.global.min.js +1 -1
  21. package/locales/ar-tn.global.js +1 -1
  22. package/locales/ar-tn.global.min.js +1 -1
  23. package/locales/ar.global.js +1 -1
  24. package/locales/ar.global.min.js +1 -1
  25. package/locales/az.global.js +1 -1
  26. package/locales/az.global.min.js +1 -1
  27. package/locales/bg.global.js +1 -1
  28. package/locales/bg.global.min.js +1 -1
  29. package/locales/bn.global.js +1 -1
  30. package/locales/bn.global.min.js +1 -1
  31. package/locales/bs.global.js +1 -1
  32. package/locales/bs.global.min.js +1 -1
  33. package/locales/ca.global.js +1 -1
  34. package/locales/ca.global.min.js +1 -1
  35. package/locales/cs.global.js +1 -1
  36. package/locales/cs.global.min.js +1 -1
  37. package/locales/cy.global.js +1 -1
  38. package/locales/cy.global.min.js +1 -1
  39. package/locales/da.global.js +1 -1
  40. package/locales/da.global.min.js +1 -1
  41. package/locales/de-at.global.js +1 -1
  42. package/locales/de-at.global.min.js +1 -1
  43. package/locales/de.global.js +1 -1
  44. package/locales/de.global.min.js +1 -1
  45. package/locales/el.global.js +1 -1
  46. package/locales/el.global.min.js +1 -1
  47. package/locales/en-au.global.js +1 -1
  48. package/locales/en-au.global.min.js +1 -1
  49. package/locales/en-gb.global.js +1 -1
  50. package/locales/en-gb.global.min.js +1 -1
  51. package/locales/en-nz.global.js +1 -1
  52. package/locales/en-nz.global.min.js +1 -1
  53. package/locales/eo.global.js +1 -1
  54. package/locales/eo.global.min.js +1 -1
  55. package/locales/es-us.global.js +1 -1
  56. package/locales/es-us.global.min.js +1 -1
  57. package/locales/es.global.js +1 -1
  58. package/locales/es.global.min.js +1 -1
  59. package/locales/et.global.js +1 -1
  60. package/locales/et.global.min.js +1 -1
  61. package/locales/eu.global.js +1 -1
  62. package/locales/eu.global.min.js +1 -1
  63. package/locales/fa.global.js +1 -1
  64. package/locales/fa.global.min.js +1 -1
  65. package/locales/fi.global.js +1 -1
  66. package/locales/fi.global.min.js +1 -1
  67. package/locales/fr-ca.global.js +1 -1
  68. package/locales/fr-ca.global.min.js +1 -1
  69. package/locales/fr-ch.global.js +1 -1
  70. package/locales/fr-ch.global.min.js +1 -1
  71. package/locales/fr.global.js +1 -1
  72. package/locales/fr.global.min.js +1 -1
  73. package/locales/gl.global.js +1 -1
  74. package/locales/gl.global.min.js +1 -1
  75. package/locales/he.global.js +1 -1
  76. package/locales/he.global.min.js +1 -1
  77. package/locales/hi.global.js +1 -1
  78. package/locales/hi.global.min.js +1 -1
  79. package/locales/hr.global.js +1 -1
  80. package/locales/hr.global.min.js +1 -1
  81. package/locales/hu.global.js +1 -1
  82. package/locales/hu.global.min.js +1 -1
  83. package/locales/hy-am.global.js +1 -1
  84. package/locales/hy-am.global.min.js +1 -1
  85. package/locales/id.global.js +1 -1
  86. package/locales/id.global.min.js +1 -1
  87. package/locales/is.global.js +1 -1
  88. package/locales/is.global.min.js +1 -1
  89. package/locales/it.global.js +1 -1
  90. package/locales/it.global.min.js +1 -1
  91. package/locales/ja.global.js +1 -1
  92. package/locales/ja.global.min.js +1 -1
  93. package/locales/ka.global.js +1 -1
  94. package/locales/ka.global.min.js +1 -1
  95. package/locales/kk.global.js +1 -1
  96. package/locales/kk.global.min.js +1 -1
  97. package/locales/km.global.js +1 -1
  98. package/locales/km.global.min.js +1 -1
  99. package/locales/ko.global.js +1 -1
  100. package/locales/ko.global.min.js +1 -1
  101. package/locales/ku.global.js +1 -1
  102. package/locales/ku.global.min.js +1 -1
  103. package/locales/lb.global.js +1 -1
  104. package/locales/lb.global.min.js +1 -1
  105. package/locales/lt.global.js +1 -1
  106. package/locales/lt.global.min.js +1 -1
  107. package/locales/lv.global.js +1 -1
  108. package/locales/lv.global.min.js +1 -1
  109. package/locales/mk.global.js +1 -1
  110. package/locales/mk.global.min.js +1 -1
  111. package/locales/ms.global.js +1 -1
  112. package/locales/ms.global.min.js +1 -1
  113. package/locales/nb.global.js +1 -1
  114. package/locales/nb.global.min.js +1 -1
  115. package/locales/ne.global.js +1 -1
  116. package/locales/ne.global.min.js +1 -1
  117. package/locales/nl.global.js +1 -1
  118. package/locales/nl.global.min.js +1 -1
  119. package/locales/nn.global.js +1 -1
  120. package/locales/nn.global.min.js +1 -1
  121. package/locales/pl.global.js +1 -1
  122. package/locales/pl.global.min.js +1 -1
  123. package/locales/pt-br.global.js +1 -1
  124. package/locales/pt-br.global.min.js +1 -1
  125. package/locales/pt.global.js +1 -1
  126. package/locales/pt.global.min.js +1 -1
  127. package/locales/ro.global.js +1 -1
  128. package/locales/ro.global.min.js +1 -1
  129. package/locales/ru.global.js +1 -1
  130. package/locales/ru.global.min.js +1 -1
  131. package/locales/si-lk.global.js +1 -1
  132. package/locales/si-lk.global.min.js +1 -1
  133. package/locales/sk.global.js +1 -1
  134. package/locales/sk.global.min.js +1 -1
  135. package/locales/sl.global.js +1 -1
  136. package/locales/sl.global.min.js +1 -1
  137. package/locales/sm.global.js +1 -1
  138. package/locales/sm.global.min.js +1 -1
  139. package/locales/sq.global.js +1 -1
  140. package/locales/sq.global.min.js +1 -1
  141. package/locales/sr-cyrl.global.js +1 -1
  142. package/locales/sr-cyrl.global.min.js +1 -1
  143. package/locales/sr.global.js +1 -1
  144. package/locales/sr.global.min.js +1 -1
  145. package/locales/sv.global.js +1 -1
  146. package/locales/sv.global.min.js +1 -1
  147. package/locales/ta-in.global.js +1 -1
  148. package/locales/ta-in.global.min.js +1 -1
  149. package/locales/th.global.js +1 -1
  150. package/locales/th.global.min.js +1 -1
  151. package/locales/tr.global.js +1 -1
  152. package/locales/tr.global.min.js +1 -1
  153. package/locales/ug.global.js +1 -1
  154. package/locales/ug.global.min.js +1 -1
  155. package/locales/uk.global.js +1 -1
  156. package/locales/uk.global.min.js +1 -1
  157. package/locales/uz-cy.global.js +1 -1
  158. package/locales/uz-cy.global.min.js +1 -1
  159. package/locales/uz.global.js +1 -1
  160. package/locales/uz.global.min.js +1 -1
  161. package/locales/vi.global.js +1 -1
  162. package/locales/vi.global.min.js +1 -1
  163. package/locales/zh-cn.global.js +1 -1
  164. package/locales/zh-cn.global.min.js +1 -1
  165. package/locales/zh-tw.global.js +1 -1
  166. package/locales/zh-tw.global.min.js +1 -1
  167. package/locales-all.global.js +1 -1
  168. package/locales-all.global.min.js +1 -1
  169. package/package.json +1 -1
  170. package/preact.js +1 -1
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { m as mergeProps, g as guid, i as isArraysEqual, T as Theme, a as mapHash, B as BaseComponent, V as ViewContextType, C as ContentContainer, b as buildViewClassNames, c as greatestDurationDenominator, d as createDuration, e as BASE_OPTION_DEFAULTS, f as arrayToHash, h as filterHash, j as buildEventSourceRefiners, p as parseEventSource, k as formatWithOrdinals, u as unpromisify, l as buildRangeApiWithTimeZone, n as identity, r as requestJson, s as subtractDurations, o as intersectRanges, q as startOfDay, t as addDays, v as hashValuesToArray, w as buildEventApis, D as DelayedRunner, x as createFormatter, y as diffWholeDays, z as memoize, A as memoizeObjArg, E as isPropsEqual, F as Emitter, G as getInitialDate, H as rangeContainsMarker, I as createEmptyEventStore, J as reduceCurrentDate, K as reduceEventStore, L as rezoneEventStoreDates, M as mergeRawOptions, N as BASE_OPTION_REFINERS, O as CALENDAR_LISTENER_REFINERS, P as CALENDAR_OPTION_REFINERS, Q as COMPLEX_OPTION_COMPARATORS, R as VIEW_OPTION_REFINERS, S as DateEnv, U as DateProfileGenerator, W as createEventUi, X as parseBusinessHours, Y as setRef, Z as Interaction, _ as getElSeg, $ as elementClosest, a0 as EventImpl, a1 as listenBySelector, a2 as listenToHoverBySelector, a3 as PureComponent, a4 as buildViewContext, a5 as getUniqueDomId, a6 as parseInteractionSettings, a7 as interactionSettingsStore, a8 as getNow, a9 as CalendarImpl, aa as flushSync, ab as CalendarRoot, ac as RenderId, ad as ensureElHasStyles, ae as applyStyleProp, af as sliceEventStore } from './internal-common.js';
2
- export { ag as JsonRequestError } from './internal-common.js';
1
+ import { m as mergeProps, g as guid, i as isArraysEqual, T as Theme, a as mapHash, B as BaseComponent, V as ViewContextType, C as ContentContainer, b as buildViewClassNames, c as greatestDurationDenominator, d as createDuration, e as BASE_OPTION_DEFAULTS, f as arrayToHash, h as filterHash, j as buildEventSourceRefiners, p as parseEventSource, k as formatWithOrdinals, u as unpromisify, l as buildRangeApiWithTimeZone, n as identity, r as requestJson, s as subtractDurations, o as intersectRanges, q as startOfDay, t as addDays, v as hashValuesToArray, w as buildEventApis, D as DelayedRunner, x as createFormatter, y as diffWholeDays, z as memoize, A as memoizeObjArg, E as isPropsEqual, F as Emitter, G as rangeContainsMarker, H as createEmptyEventStore, I as reduceEventStore, J as rezoneEventStoreDates, K as mergeRawOptions, L as BASE_OPTION_REFINERS, M as CALENDAR_LISTENER_REFINERS, N as CALENDAR_OPTION_REFINERS, O as COMPLEX_OPTION_COMPARATORS, P as VIEW_OPTION_REFINERS, Q as DateEnv, R as DateProfileGenerator, S as createEventUi, U as parseBusinessHours, W as setRef, X as Interaction, Y as getElSeg, Z as elementClosest, _ as EventImpl, $ as listenBySelector, a0 as listenToHoverBySelector, a1 as PureComponent, a2 as buildViewContext, a3 as getUniqueDomId, a4 as parseInteractionSettings, a5 as interactionSettingsStore, a6 as NowTimer, a7 as CalendarImpl, a8 as flushSync, a9 as CalendarRoot, aa as RenderId, ab as ensureElHasStyles, ac as applyStyleProp, ad as sliceEventStore } from './internal-common.js';
2
+ export { ae as JsonRequestError } from './internal-common.js';
3
3
  import { createElement, createRef, Fragment, render } from 'preact';
4
4
  import 'preact/compat';
5
5
 
@@ -459,6 +459,25 @@ function reduceViewType(viewType, action) {
459
459
  return viewType;
460
460
  }
461
461
 
462
+ function reduceCurrentDate(currentDate, action) {
463
+ switch (action.type) {
464
+ case 'CHANGE_DATE':
465
+ return action.dateMarker;
466
+ default:
467
+ return currentDate;
468
+ }
469
+ }
470
+ // should be initialized once and stay constant
471
+ // this will change too
472
+ function getInitialDate(options, dateEnv, nowManager) {
473
+ let initialDateInput = options.initialDate;
474
+ // compute the initial ambig-timezone date
475
+ if (initialDateInput != null) {
476
+ return dateEnv.createMarker(initialDateInput);
477
+ }
478
+ return nowManager.getDateMarker();
479
+ }
480
+
462
481
  function reduceDynamicOptionOverrides(dynamicOptionOverrides, action) {
463
482
  switch (action.type) {
464
483
  case 'SET_OPTION':
@@ -968,6 +987,7 @@ let recurring = {
968
987
  endTime: refined.endTime || null,
969
988
  startRecur: refined.startRecur ? dateEnv.createMarker(refined.startRecur) : null,
970
989
  endRecur: refined.endRecur ? dateEnv.createMarker(refined.endRecur) : null,
990
+ dateEnv,
971
991
  };
972
992
  let duration;
973
993
  if (refined.duration) {
@@ -987,7 +1007,7 @@ let recurring = {
987
1007
  expand(typeData, framingRange, dateEnv) {
988
1008
  let clippedFramingRange = intersectRanges(framingRange, { start: typeData.startRecur, end: typeData.endRecur });
989
1009
  if (clippedFramingRange) {
990
- return expandRanges(typeData.daysOfWeek, typeData.startTime, clippedFramingRange, dateEnv);
1010
+ return expandRanges(typeData.daysOfWeek, typeData.startTime, typeData.dateEnv, dateEnv, clippedFramingRange);
991
1011
  }
992
1012
  return [];
993
1013
  },
@@ -997,7 +1017,7 @@ const simpleRecurringEventsPlugin = createPlugin({
997
1017
  recurringTypes: [recurring],
998
1018
  eventRefiners: SIMPLE_RECURRING_REFINERS,
999
1019
  });
1000
- function expandRanges(daysOfWeek, startTime, framingRange, dateEnv) {
1020
+ function expandRanges(daysOfWeek, startTime, eventDateEnv, calendarDateEnv, framingRange) {
1001
1021
  let dowHash = daysOfWeek ? arrayToHash(daysOfWeek) : null;
1002
1022
  let dayMarker = startOfDay(framingRange.start);
1003
1023
  let endMarker = framingRange.end;
@@ -1007,12 +1027,12 @@ function expandRanges(daysOfWeek, startTime, framingRange, dateEnv) {
1007
1027
  // if everyday, or this particular day-of-week
1008
1028
  if (!dowHash || dowHash[dayMarker.getUTCDay()]) {
1009
1029
  if (startTime) {
1010
- instanceStart = dateEnv.add(dayMarker, startTime);
1030
+ instanceStart = calendarDateEnv.add(dayMarker, startTime);
1011
1031
  }
1012
1032
  else {
1013
1033
  instanceStart = dayMarker;
1014
1034
  }
1015
- instanceStarts.push(instanceStart);
1035
+ instanceStarts.push(calendarDateEnv.createMarker(eventDateEnv.toDate(instanceStart)));
1016
1036
  }
1017
1037
  dayMarker = addDays(dayMarker, 1);
1018
1038
  }
@@ -1177,6 +1197,49 @@ function buildTitleFormat(dateProfile) {
1177
1197
  return { year: 'numeric', month: 'long', day: 'numeric' };
1178
1198
  }
1179
1199
 
1200
+ /*
1201
+ TODO: test switching timezones when NO timezone plugin
1202
+ */
1203
+ class CalendarNowManager {
1204
+ constructor() {
1205
+ this.resetListeners = new Set();
1206
+ }
1207
+ handleInput(dateEnv, // will change if timezone setup changed
1208
+ nowInput) {
1209
+ const oldDateEnv = this.dateEnv;
1210
+ if (dateEnv !== oldDateEnv) {
1211
+ if (typeof nowInput === 'function') {
1212
+ this.nowFn = nowInput;
1213
+ }
1214
+ else if (!oldDateEnv) { // first time?
1215
+ this.nowAnchorDate = dateEnv.toDate(nowInput
1216
+ ? dateEnv.createMarker(nowInput)
1217
+ : dateEnv.createNowMarker());
1218
+ this.nowAnchorQueried = Date.now();
1219
+ }
1220
+ this.dateEnv = dateEnv;
1221
+ // not first time? fire reset handlers
1222
+ if (oldDateEnv) {
1223
+ for (const resetListener of this.resetListeners.values()) {
1224
+ resetListener();
1225
+ }
1226
+ }
1227
+ }
1228
+ }
1229
+ getDateMarker() {
1230
+ return this.nowAnchorDate
1231
+ ? this.dateEnv.timestampToMarker(this.nowAnchorDate.valueOf() +
1232
+ (Date.now() - this.nowAnchorQueried))
1233
+ : this.dateEnv.createMarker(this.nowFn());
1234
+ }
1235
+ addResetListener(handler) {
1236
+ this.resetListeners.add(handler);
1237
+ }
1238
+ removeResetListener(handler) {
1239
+ this.resetListeners.delete(handler);
1240
+ }
1241
+ }
1242
+
1180
1243
  // in future refactor, do the redux-style function(state=initial) for initial-state
1181
1244
  // also, whatever is happening in constructor, have it happen in action queue too
1182
1245
  class CalendarDataManager {
@@ -1196,6 +1259,7 @@ class CalendarDataManager {
1196
1259
  this.buildEventUiBases = memoize(buildEventUiBases);
1197
1260
  this.parseContextBusinessHours = memoizeObjArg(parseContextBusinessHours);
1198
1261
  this.buildTitle = memoize(buildTitle);
1262
+ this.nowManager = new CalendarNowManager();
1199
1263
  this.emitter = new Emitter();
1200
1264
  this.actionRunner = new TaskRunner(this._handleAction.bind(this), this.updateData.bind(this));
1201
1265
  this.currentCalendarOptionsInput = {};
@@ -1211,6 +1275,7 @@ class CalendarDataManager {
1211
1275
  };
1212
1276
  this.props = props;
1213
1277
  this.actionRunner.pause();
1278
+ this.nowManager = new CalendarNowManager();
1214
1279
  let dynamicOptionOverrides = {};
1215
1280
  let optionsData = this.computeOptionsData(props.optionOverrides, dynamicOptionOverrides, props.calendarApi);
1216
1281
  let currentViewType = optionsData.calendarOptions.initialView || optionsData.pluginHooks.initialView;
@@ -1220,12 +1285,8 @@ class CalendarDataManager {
1220
1285
  props.calendarApi.currentDataManager = this;
1221
1286
  this.emitter.setThisContext(props.calendarApi);
1222
1287
  this.emitter.setOptions(currentViewData.options);
1223
- let currentDate = getInitialDate(optionsData.calendarOptions, optionsData.dateEnv);
1224
- let dateProfile = currentViewData.dateProfileGenerator.build(currentDate);
1225
- if (!rangeContainsMarker(dateProfile.activeRange, currentDate)) {
1226
- currentDate = dateProfile.currentRange.start;
1227
- }
1228
1288
  let calendarContext = {
1289
+ nowManager: this.nowManager,
1229
1290
  dateEnv: optionsData.dateEnv,
1230
1291
  options: optionsData.calendarOptions,
1231
1292
  pluginHooks: optionsData.pluginHooks,
@@ -1234,6 +1295,11 @@ class CalendarDataManager {
1234
1295
  emitter: this.emitter,
1235
1296
  getCurrentData: this.getCurrentData,
1236
1297
  };
1298
+ let currentDate = getInitialDate(optionsData.calendarOptions, optionsData.dateEnv, this.nowManager);
1299
+ let dateProfile = currentViewData.dateProfileGenerator.build(currentDate);
1300
+ if (!rangeContainsMarker(dateProfile.activeRange, currentDate)) {
1301
+ currentDate = dateProfile.currentRange.start;
1302
+ }
1237
1303
  // needs to be after setThisContext
1238
1304
  for (let callback of optionsData.pluginHooks.contextInit) {
1239
1305
  callback(calendarContext);
@@ -1294,6 +1360,7 @@ class CalendarDataManager {
1294
1360
  emitter.setThisContext(props.calendarApi);
1295
1361
  emitter.setOptions(currentViewData.options);
1296
1362
  let calendarContext = {
1363
+ nowManager: this.nowManager,
1297
1364
  dateEnv: optionsData.dateEnv,
1298
1365
  options: optionsData.calendarOptions,
1299
1366
  pluginHooks: optionsData.pluginHooks,
@@ -1361,7 +1428,7 @@ class CalendarDataManager {
1361
1428
  let oldData = this.data;
1362
1429
  let optionsData = this.computeOptionsData(props.optionOverrides, state.dynamicOptionOverrides, props.calendarApi);
1363
1430
  let currentViewData = this.computeCurrentViewData(state.currentViewType, optionsData, props.optionOverrides, state.dynamicOptionOverrides);
1364
- let data = this.data = Object.assign(Object.assign(Object.assign({ viewTitle: this.buildTitle(state.dateProfile, currentViewData.options, optionsData.dateEnv), calendarApi: props.calendarApi, dispatch: this.dispatch, emitter: this.emitter, getCurrentData: this.getCurrentData }, optionsData), currentViewData), state);
1431
+ let data = this.data = Object.assign(Object.assign(Object.assign({ nowManager: this.nowManager, viewTitle: this.buildTitle(state.dateProfile, currentViewData.options, optionsData.dateEnv), calendarApi: props.calendarApi, dispatch: this.dispatch, emitter: this.emitter, getCurrentData: this.getCurrentData }, optionsData), currentViewData), state);
1365
1432
  let changeHandlers = optionsData.pluginHooks.optionChangeHandlers;
1366
1433
  let oldCalendarOptions = oldData && oldData.calendarOptions;
1367
1434
  let newCalendarOptions = optionsData.calendarOptions;
@@ -1469,8 +1536,10 @@ class CalendarDataManager {
1469
1536
  }
1470
1537
  let { refinedOptions, extra } = this.processRawViewOptions(viewSpec, optionsData.pluginHooks, optionsData.localeDefaults, optionOverrides, dynamicOptionOverrides);
1471
1538
  warnUnknownOptions(extra);
1539
+ this.nowManager.handleInput(optionsData.dateEnv, refinedOptions.now);
1472
1540
  let dateProfileGenerator = this.buildDateProfileGenerator({
1473
1541
  dateProfileGeneratorClass: viewSpec.optionDefaults.dateProfileGeneratorClass,
1542
+ nowManager: this.nowManager,
1474
1543
  duration: viewSpec.duration,
1475
1544
  durationUnit: viewSpec.durationUnit,
1476
1545
  usesMinMaxTime: viewSpec.optionDefaults.usesMinMaxTime,
@@ -1484,7 +1553,6 @@ class CalendarDataManager {
1484
1553
  dateIncrement: refinedOptions.dateIncrement,
1485
1554
  hiddenDays: refinedOptions.hiddenDays,
1486
1555
  weekends: refinedOptions.weekends,
1487
- nowInput: refinedOptions.now,
1488
1556
  validRangeInput: refinedOptions.validRange,
1489
1557
  visibleRangeInput: refinedOptions.visibleRange,
1490
1558
  fixedWeekCount: refinedOptions.fixedWeekCount,
@@ -1888,8 +1956,6 @@ class CalendarContent extends PureComponent {
1888
1956
  render() {
1889
1957
  let { props } = this;
1890
1958
  let { toolbarConfig, options } = props;
1891
- let toolbarProps = this.buildToolbarProps(props.viewSpec, props.dateProfile, props.dateProfileGenerator, props.currentDate, getNow(props.options.now, props.dateEnv), // TODO: use NowTimer????
1892
- props.viewTitle);
1893
1959
  let viewVGrow = false;
1894
1960
  let viewHeight = '';
1895
1961
  let viewAspectRatio;
@@ -1905,16 +1971,20 @@ class CalendarContent extends PureComponent {
1905
1971
  else {
1906
1972
  viewAspectRatio = Math.max(options.aspectRatio, 0.5); // prevent from getting too tall
1907
1973
  }
1908
- let viewContext = this.buildViewContext(props.viewSpec, props.viewApi, props.options, props.dateProfileGenerator, props.dateEnv, props.theme, props.pluginHooks, props.dispatch, props.getCurrentData, props.emitter, props.calendarApi, this.registerInteractiveComponent, this.unregisterInteractiveComponent);
1974
+ let viewContext = this.buildViewContext(props.viewSpec, props.viewApi, props.options, props.dateProfileGenerator, props.dateEnv, props.nowManager, props.theme, props.pluginHooks, props.dispatch, props.getCurrentData, props.emitter, props.calendarApi, this.registerInteractiveComponent, this.unregisterInteractiveComponent);
1909
1975
  let viewLabelId = (toolbarConfig.header && toolbarConfig.header.hasTitle)
1910
1976
  ? this.state.viewLabelId
1911
1977
  : undefined;
1912
1978
  return (createElement(ViewContextType.Provider, { value: viewContext },
1913
- toolbarConfig.header && (createElement(Toolbar, Object.assign({ ref: this.headerRef, extraClassName: "fc-header-toolbar", model: toolbarConfig.header, titleId: viewLabelId }, toolbarProps))),
1914
- createElement(ViewHarness, { liquid: viewVGrow, height: viewHeight, aspectRatio: viewAspectRatio, labeledById: viewLabelId },
1915
- this.renderView(props),
1916
- this.buildAppendContent()),
1917
- toolbarConfig.footer && (createElement(Toolbar, Object.assign({ ref: this.footerRef, extraClassName: "fc-footer-toolbar", model: toolbarConfig.footer, titleId: "" }, toolbarProps)))));
1979
+ createElement(NowTimer, { unit: "day" }, (nowDate) => {
1980
+ let toolbarProps = this.buildToolbarProps(props.viewSpec, props.dateProfile, props.dateProfileGenerator, props.currentDate, nowDate, props.viewTitle);
1981
+ return (createElement(Fragment, null,
1982
+ toolbarConfig.header && (createElement(Toolbar, Object.assign({ ref: this.headerRef, extraClassName: "fc-header-toolbar", model: toolbarConfig.header, titleId: viewLabelId }, toolbarProps))),
1983
+ createElement(ViewHarness, { liquid: viewVGrow, height: viewHeight, aspectRatio: viewAspectRatio, labeledById: viewLabelId },
1984
+ this.renderView(props),
1985
+ this.buildAppendContent()),
1986
+ toolbarConfig.footer && (createElement(Toolbar, Object.assign({ ref: this.footerRef, extraClassName: "fc-footer-toolbar", model: toolbarConfig.footer, titleId: "" }, toolbarProps)))));
1987
+ })));
1918
1988
  }
1919
1989
  componentDidMount() {
1920
1990
  let { props } = this;
@@ -2136,6 +2206,6 @@ function sliceEvents(props, allDay) {
2136
2206
  return sliceEventStore(props.eventStore, props.eventUiBases, props.dateProfile.activeRange, allDay ? props.nextDayThreshold : null).fg;
2137
2207
  }
2138
2208
 
2139
- const version = '6.1.15';
2209
+ const version = '6.1.18';
2140
2210
 
2141
2211
  export { Calendar, createPlugin, formatDate, formatRange, globalLocales, globalPlugins, sliceEvents, version };