Interface ITimePicker<TEvent>

Since

0.1

TimePicker is a dialog where users are able to select the time.

Example

import TimePicker from '@smartface/native/ui/timepicker';
const myTimePicker = new TimePicker();
myTimePicker.onTimeSelected = (time) => {
console.log('Hour: ' + time.hour + ' Minute: ' + time.minute);
};
myTimePicker.android.is24HourFormat = false;
myTimePicker.show();

Type Parameters

Hierarchy

  • default<TEvent>
    • ITimePicker

Properties

_nativeObject: any
is24HourFormat: boolean

Sets whether time is 24-hour or AM/PM mode.

Property

Android

Since

0.1

Accessors

  • get nativeObject(): any
  • Returns any

  • set nativeObject(value: any): void
  • Parameters

    • value: any

    Returns void

  • get ios(): TProps["ios"]
  • Returns TProps["ios"]

  • get android(): TProps["android"]
  • Returns TProps["android"]

Methods

  • Executed before everything. This should return nativeObject since it will be assinged directly to nativeObject.

    Parameters

    • Optional params: Partial<Record<string, any>>

    Returns any

  • Parameters

    • Optional params: Partial<Record<string, any>>

    Returns void

  • Parameters

    • props: Partial<{ [key: string]: any }>

    Returns void

  • Parameters

    • props: Partial<{ [key: string]: any }>

    Returns void

  • Sets the time avaliable on the picker.

    Method

    setTime

    Android

    Ios

    Since

    0.1

    Parameters

    • params: { hour: number; minute: number }
      • hour: number
      • minute: number

    Returns void

  • Makes the picker appear on the screen.

    Method

    show

    Android

    Ios

    Since

    0.1

    Returns void

  • Parameters

    • eventName: "selected"
    • callback: ((e: { hour: number; minute: number }) => void)
        • (e: { hour: number; minute: number }): void
        • Parameters

          • e: { hour: number; minute: number }
            • hour: number
            • minute: number

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "selected"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: string
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "selected"
    • callback: ((e: { hour: number; minute: number }) => void)
        • (e: { hour: number; minute: number }): void
        • Parameters

          • e: { hour: number; minute: number }
            • hour: number
            • minute: number

          Returns void

    Returns void

  • Parameters

    • eventName: "selected"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

  • Parameters

    • eventName: string
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

  • Parameters

    • eventName: "selected"
    • e: { hour: number; minute: number }
      • hour: number
      • minute: number

    Returns void

  • Parameters

    • eventName: "selected"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • eventName: string
    • Rest ...args: any[]

    Returns void

  • Parameters

    • eventName: "selected"
    • callback: ((e: { hour: number; minute: number }) => void)
        • (e: { hour: number; minute: number }): void
        • Parameters

          • e: { hour: number; minute: number }
            • hour: number
            • minute: number

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "selected"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: string
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "selected"
    • callback: ((e: { hour: number; minute: number }) => void)
        • (e: { hour: number; minute: number }): void
        • Parameters

          • e: { hour: number; minute: number }
            • hour: number
            • minute: number

          Returns void

    Returns void

  • Parameters

    • eventName: "selected"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

  • Parameters

    • eventName: string
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

  • Parameters

    • eventName: "selected"
    • callback: ((e: { hour: number; minute: number }) => void)
        • (e: { hour: number; minute: number }): void
        • Parameters

          • e: { hour: number; minute: number }
            • hour: number
            • minute: number

          Returns void

    Returns void

  • Parameters

    • eventName: "selected"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

  • Parameters

    • eventName: string
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

Events

onTimeSelected: ((e: { hour: number; minute: number }) => void)

Type declaration

    • (e: { hour: number; minute: number }): void
    • Triggered when a time is selected on the picker.

      Since

      0.1

      Deprecated

      onTimeSelected

      Android

      Ios

      Example

      import TimePicker from '@smartface/native/ui/timepicker';

      const timePicker = new TimePicker();
      timePicker.on(TimePicker.Events.Selected, (params) => {
      console.info('onTimeSelected', params);
      });

      Parameters

      • e: { hour: number; minute: number }
        • hour: number
        • minute: number

      Returns void

Generated using TypeDoc