8000 feat(types): create declarations for `<b-calendar>` and `<b-time>` co… · bootstrap-vue/bootstrap-vue@8f3ca30 · GitHub
[go: up one dir, main page]

Skip to content 10000

Commit 8f3ca30

Browse files
authored
feat(types): create declarations for <b-calendar> and <b-time> context event objects (closes #5366) (#5374)
* feat(types): create declarations for `<b-calendar>` and `<b-time>` context event objects * Update index.d.ts * Update index.d.ts * Update index.d.ts * Update index.d.ts
1 parent 064cdf4 commit 8f3ca30

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

src/components/calendar/index.d.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,19 @@ export declare class BCalendar extends BvComponent {
1010
focus: () => void
1111
blur: () => void
1212
}
13+
14+
// --- Interfaces ---
15+
16+
// Calendar context event object
17+
export interface BcCalendarCtxObject {
18+
readonly selectedFormatted: string
19+
readonly selectedYMD: string
20+
readonly selectedDate: Date | null
21+
readonly activeFormatted: string
22+
readonly activeYMD: string
23+
readonly activeDate: Date | null
24+
readonly disabled: boolean
25+
readonly locale: string
26+
readonly calendarLocale: string
27+
readonly rtl: boolean
28+
}

src/components/time/index.d.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,18 @@ export declare class BTime extends BvComponent {
1010
focus: () => void
1111
blur: () => void
1212
}
13+
14+
// --- Interfaces ---
15+
16+
// Time context event object
17+
export interface BvTimeCtxEvent {
18+
readonly formatted: string
19+
readonly value: string
20+
readonly hours: number | null
21+
readonly minutes: number | null
22+
readonly seconds: number | null
23+
readonly hourCycle: string
24+
readonly hour12: boolean
25+
readonly locale: string
26+
readonly isRtl: boolean
27+
}

0 commit comments

Comments
 (0)
0