Skip to content

Commit 5cf1e43

Browse files
committed
fix: timeline format labels funtion Date params to Moment type fix
1 parent 9d33790 commit 5cf1e43

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/timeline/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -668,8 +668,8 @@ <h2 id="Configuration_Options">Configuration Options</h2>
668668
You can also use a function format for each label. The function accepts as arguments the date, scale and step in that order, and expects to return a string for the label.
669669

670670
<pre class="prettyprint lang-js">function format({
671-
minorLabels: Function(date: Date, scale: Number, step: Number),
672-
majorLabels: Function(date: Date, scale: Number, step: Number)
671+
minorLabels: Function(date: Moment, scale: Number, step: Number),
672+
majorLabels: Function(date: Moment, scale: Number, step: Number)
673673
}</pre>
674674
</td>
675675
</tr>

types/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export interface TimelineEditableOption {
144144
overrideItems?: boolean;
145145
}
146146

147-
export type TimelineFormatLabelsFunction = (date: Date, scale: string, step: number) => string;
147+
export type TimelineFormatLabelsFunction = (date: Moment, scale: string, step: number) => string;
148148

149149
export interface TimelineFormatLabelsOption {
150150
millisecond?: string;

0 commit comments

Comments
 (0)