{this.dateRange.map(
([time, newDayDate]: any, index: any) => {
- const newDay = this.timePattern.test(time)
- ? newDayDate
- : ''
- if (newDay !== '' && !this.firstNewDay)
- this.firstNewDay = index
+ let newDay
+ if (['hour', 'minute'].includes(this.interval)) {
+ newDay = this.timePattern.test(time)
+ ? newDayDate
+ : ''
+ }
return (
{time}
- {this.shouldShowDate(time) ? (
-
- {newDay}
-
- ) : null}
+ {this.secondaryRuler(time, newDay, index)}
)
}
)}
- {this.showStartOfDay &&
- ['hour', 'minute'].includes(this.interval)
- ? this.getPartialDay()
- : null}
+ {this.showStartOfDay ? this.getPartial() : null}
)
diff --git a/packages/web-components/src/index.html b/packages/web-components/src/index.html
index 3ca0c4574..6ad97accf 100644
--- a/packages/web-components/src/index.html
+++ b/packages/web-components/src/index.html
@@ -88,9 +88,9 @@
id="first"
has-played-indicator="false"
timezone="America/New_York"
- start="2021-02-01T00:00:00.000Z"
- end="2021-03-03T01:00:00.000Z"
- playhead="2021-02-02T00:00:00.000Z"
+ start="2021-01-01T00:00:00.000Z"
+ end="2021-03-01T01:00:00.000Z"
+ playhead="2021-01-02T00:00:00.000Z"
interval="hour"
zoom="4"
show-grid
@@ -108,139 +108,13 @@