Răsfoiți Sursa

finish off eventTimeFormat

Adam Shaw 7 ani în urmă
părinte
comite
1f78ec2e64

+ 1 - 1
demos/timezones.html

@@ -39,7 +39,7 @@
         }
       },
 
-      timeFormat: { hour: 'numeric', minute: '2-digit', timeZoneName: 'short' },
+      eventTimeFormat: { hour: 'numeric', minute: '2-digit', timeZoneName: 'short' },
       // TODO: once event API is better:
       // eventRender: function(event, el) {
       // },

+ 1 - 1
src/agenda/TimeGridEventRenderer.ts

@@ -71,7 +71,7 @@ export default class TimeGridEventRenderer extends EventRenderer {
   }
 
 
-  // Computes a default event time formatting string if `timeFormat` is not explicitly defined
+  // Computes a default event time formatting string if `eventTimeFormat` is not explicitly defined
   computeEventTimeFormat() {
     return {
       hour: 'numeric',

+ 1 - 1
src/basic/DayGridEventRenderer.ts

@@ -218,7 +218,7 @@ export default class DayGridEventRenderer extends EventRenderer {
   }
 
 
-  // Computes a default event time formatting string if `timeFormat` is not explicitly defined
+  // Computes a default event time formatting string if `eventTimeFormat` is not explicitly defined
   computeEventTimeFormat() {
     return {
       hour: 'numeric',

+ 1 - 1
src/types/input-types.ts

@@ -121,7 +121,7 @@ export interface OptionsInputBase {
   duration?: DurationInput
   dayCount?: number
   locale?: string
-  timeFormat?: FormatterInput
+  eventTimeFormat?: FormatterInput
   columnHeader?: boolean
   columnHeaderFormat?: FormatterInput
   columnHeaderText?: string | ((date: DateInput) => string)

+ 1 - 1
tests/automated/event-render/timeText.js

@@ -14,7 +14,7 @@ describe('the time text on events', function() {
 
       initCalendar({
         timeZone: 'local',
-        timeFormat: FORMAT,
+        eventTimeFormat: FORMAT,
         events: [
           { start: '2017-07-03T23:00:00', end: '2017-07-04T13:00:00' }
         ]

+ 1 - 1
tests/automated/legacy/displayEventEnd.js

@@ -5,7 +5,7 @@ describe('displayEventEnd', function() {
   pushOptions({
     defaultDate: '2014-06-13',
     timeZone: 'UTC',
-    timeFormat: { hour: 'numeric', minute: '2-digit' }
+    eventTimeFormat: { hour: 'numeric', minute: '2-digit' }
   })
 
   describeOptions('defaultView', {

+ 3 - 3
tests/automated/legacy/timeFormat.js → tests/automated/legacy/eventTimeFormat.js

@@ -1,4 +1,4 @@
-describe('timeFormat', function() {
+describe('eventTimeFormat', function() {
 
   pushOptions({
     defaultDate: '2014-06-04',
@@ -33,7 +33,7 @@ describe('timeFormat', function() {
 
     it('renders correctly when customized', function() {
       initCalendar({
-        timeFormat: { hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: false }
+        eventTimeFormat: { hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: false }
       })
       expect(getRenderedEventTime()).toBe('15:00:00')
     })
@@ -59,7 +59,7 @@ describe('timeFormat', function() {
 
     it('renders correctly when customized', function() {
       initCalendar({
-        timeFormat: { hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: false }
+        eventTimeFormat: { hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: false }
       })
       expect(getRenderedEventTime()).toBe('15:00:00 - 17:00:00')
     })