Skip to content

Commit

Permalink
fix: timeline format labels funtion Date params to Moment type fix
Browse files Browse the repository at this point in the history
  • Loading branch information
minsgy committed Apr 8, 2024
1 parent 9d33790 commit 5cf1e43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/timeline/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -668,8 +668,8 @@ <h2 id="Configuration_Options">Configuration Options</h2>
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.

<pre class="prettyprint lang-js">function format({
minorLabels: Function(date: Date, scale: Number, step: Number),
majorLabels: Function(date: Date, scale: Number, step: Number)
minorLabels: Function(date: Moment, scale: Number, step: Number),
majorLabels: Function(date: Moment, scale: Number, step: Number)
}</pre>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export interface TimelineEditableOption {
overrideItems?: boolean;
}

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

export interface TimelineFormatLabelsOption {
millisecond?: string;
Expand Down

0 comments on commit 5cf1e43

Please sign in to comment.