Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeline format labels funtion Date params to Moment type fix #1783

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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