TimePicker Component


Properties

backgroundColor
  Specifies the TimePicker's background color as an red-green-blue-alpha RRGGBBAA or red-green-blue RRGGBB string. If an Image has been set, the color change will not be visible until the Image is removed.
Data type: color
Designer Writable true <timepicker name="timepickerName" backgroundColor="FF4a4875">
Code Writeable true timepickerName.backgroundColor = "FF4a4875"
Code Readable true let variable = timepickerName.backgroundColor

enabled
  Specifies whether the TimePicker should be active and clickable.
Data type: boolean
Designer Writable true <timepicker name="timepickerName" enabled="true">
Code Writeable true timepickerName.enabled = true
Code Readable true let variable = timepickerName.enabled

fontBold
  Specifies whether the text of the TimePicker should be bold. Some fonts do not support bold.
Data type: boolean
Designer Writable true <timepicker name="timepickerName" fontBold="true">
Code Writeable true timepickerName.fontBold = true
Code Readable true let variable = timepickerName.fontBold

fontItalic
  Specifies whether the text of the TimePicker should be italic. Some fonts do not support italic.
Data type: boolean
Designer Writable true <timepicker name="timepickerName" fontItalic="true">
Code Writeable true timepickerName.fontItalic = true
Code Readable true let variable = timepickerName.fontItalic

fontSize
  Specifies the text font size of the TimePicker, measured in sp(scale-independent pixels).
Data type: number
Designer Writable true <timepicker name="timepickerName" fontSize="24">
Code Writeable true timepickerName.fontSize = 24
Code Readable true let variable = timepickerName.fontSize

fontTypeface
  Specifies the text font face of the TimePicker as 'serif', 'sans serif', or 'monospace'.
Data type: string
Designer Writable true <timepicker name="timepickerName" fontTypeface="monospace">
Code Writeable false
Code Readable false

height
  Specifies the TimePicker's vertical height, measured in pixels.
Data type: number
Designer Writable false
Code Writeable true timepickerName.height = 23
Code Readable true let variable = timepickerName.height

heightPercent
  Specifies the TimePicker's vertical height as a percentage of the Screen's Height.
Data type: number
Designer Writable false
Code Writeable true timepickerName.heightPercent = 23
Code Readable false

hour
  Returns the hour of the time that was last picked using the `TimePicker``. The time returned is always in the 24hour format.
Data type: number
Designer Writable false
Code Writeable false
Code Readable true let variable = timepickerName.hour

image
  Specifies the path of the TimePicker's image. If there is both an Image and a BackgroundColor specified, only the Image will be visible.
Data type: string
Designer Writable true <timepicker name="timepickerName" image="cat.png">
Code Writeable true timepickerName.image = "cat.png"
Code Readable true let variable = timepickerName.image

instant
  Returns the instant in time that was last picked using the TimePicker.
Data type: InstantInTime
Designer Writable false
Code Writeable false
Code Readable true let variable = timepickerName.instant

minute
  Returns the hour of the time that was last picked using the TimePicker. The time returned is always in the 24hour format.
Data type: number
Designer Writable false
Code Writeable false
Code Readable true let variable = timepickerName.minute

shape
  Specifies the shape of the TimePicker. The valid values for this property are'round', 'rectangle' and 'oval'. The Shape will not be visible if an Image is used.
Data type: string
Designer Writable true <timepicker name="timepickerName" shape="oval">
Code Writeable false
Code Readable false

showFeedback
  Specifies if a visual feedback should be shown when a TimePicker with an assigned Image is pressed.
Data type: boolean
Designer Writable true <timepicker name="timepickerName" showFeedback="true">
Code Writeable true timepickerName.showFeedback = true
Code Readable true let variable = timepickerName.showFeedback

text
  Specifies the text displayed by the TimePicker.
Data type: string
Designer Writable true <timepicker name="timepickerName" text="Test text">
Code Writeable true timepickerName.text = "Test text"
Code Readable true let variable = timepickerName.text

textAlignment
  Specifies the alignment of the TimePicker's text. Valid values are 'left', 'right' and 'center'.
Data type: string
Designer Writable true <timepicker name="timepickerName" textAlignment="center">
Code Writeable false
Code Readable false

textColor
  Specifies the text color of the TimePicker as an red-green-blue-alpha RRGGBBAA or red-green-blue RRGGBB string.
Data type: color
Designer Writable true <timepicker name="timepickerName" textColor="FF9d10bc">
Code Writeable true timepickerName.textColor = "FF9d10bc"
Code Readable true let variable = timepickerName.textColor

visible
  Specifies whether the TimePicker should be visible on the screen. Value is true if the TimePicker is showing and false if hidden.
Data type: boolean
Designer Writable true <timepicker name="timepickerName" visible="true">
Code Writeable true timepickerName.visible = true
Code Readable true let variable = timepickerName.visible

width
  Specifies the horizontal width of the TimePicker, measured in pixels.
Data type: number
Designer Writable false
Code Writeable true timepickerName.width = 423
Code Readable true let variable = timepickerName.width

widthPercent
  Specifies the horizontal width of the TimePicker as a percentage of the Screen's Width.
Data type: number
Designer Writable false
Code Writeable true timepickerName.widthPercent = 24
Code Readable false

class
  The styling class of the the component
Data type: string
Designer Writable true <timepicker name="timepickerName" class="Test class">
Code Writeable false
Code Readable false

id
  The styling id of the the component
Data type: string
Designer Writable true <timepicker name="timepickerName" id="Test id">
Code Writeable false
Code Readable false

name
  The name of the component that will be used to refer to it in code.
Data type: string
Designer Writable true <timepicker name="timepickerName" name="testComponent">
Code Writeable false
Code Readable false

Methods

Method name Description Parameters
launchPicker Launches the TimePicker dialog.
timepickerName.launchPicker()
setTimeToDisplay Allows the user to set the time to be displayed when the TimePicker opens. Valid values for the hour field are 0-23 and 0-59 for the second field.
timepickerName.setTimeToDisplay(hour, minute)
timepickerName.setTimeToDisplay(0, 0)
hour number
minute number
setTimeToDisplayFromInstant Allows the instant to set the hour and minute to be displayed when the TimePicker opens. Instants are used in Clock, DatePicker, and TimePicker components.
timepickerName.setTimeToDisplayFromInstant(instant)
timepickerName.setTimeToDisplayFromInstant(InstantInTime)
instant InstantInTime
addEventListener Method used to create event listeners.
See Events below for samples.
eventName string
eventCallbackFunction callback

Events

Event name Description Parameters
afterTimeSet This event is run when a user has set the time in the popup dialog.
timepickerName.addEventListener(
    "afterTimeSet",
    function () {
        //Your code here
    }
)
gotFocus Indicates the cursor moved over the TimePicker so it is now possible to click it.
timepickerName.addEventListener(
    "gotFocus",
    function () {
        //Your code here
    }
)
lostFocus Indicates the cursor moved away from the TimePicker so it is now no longer possible to click it.
timepickerName.addEventListener(
    "lostFocus",
    function () {
        //Your code here
    }
)
touchDown Indicates that the TimePicker was pressed down.
timepickerName.addEventListener(
    "touchDown",
    function () {
        //Your code here
    }
)
touchUp Indicates that the TimePicker has been released.
timepickerName.addEventListener(
    "touchUp",
    function () {
        //Your code here
    }
)