Skip to content
Permalink
Browse files
feat(types): create declarations for <b-calendar> and <b-time> co…
…ntext 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
  • Loading branch information
tmorehouse committed May 14, 2020
1 parent 064cdf4 commit 8f3ca30e4d51b5e97f9c4f301c31254a8b060980
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
@@ -10,3 +10,19 @@ export declare class BCalendar extends BvComponent {
focus: () => void
blur: () => void
}

// --- Interfaces ---

// Calendar context event object
export interface BcCalendarCtxObject {
readonly selectedFormatted: string
readonly selectedYMD: string
readonly selectedDate: Date | null
readonly activeFormatted: string
readonly activeYMD: string
readonly activeDate: Date | null
readonly disabled: boolean
readonly locale: string
readonly calendarLocale: string
readonly rtl: boolean
}
@@ -10,3 +10,18 @@ export declare class BTime extends BvComponent {
focus: () => void
blur: () => void
}

// --- Interfaces ---

// Time context event object
export interface BvTimeCtxEvent {
readonly formatted: string
readonly value: string
readonly hours: number | null
readonly minutes: number | null
readonly seconds: number | null
readonly hourCycle: string
readonly hour12: boolean
readonly locale: string
readonly isRtl: boolean
}

0 comments on commit 8f3ca30

Please sign in to comment.