Skip to content

DateTimeView

The DateTimeView control is used to display date, time or date and time.
The DateTimeView inherits all the methods and properties from the base class View.

Constructor:

  • constructor(parent: View)
    Creates an instance of DateTimeView control.
    • parent: the View containing the control itself.

Properties:

  • kind: DateTimeViewKind
    Specifies whether DateTimeView displays a date, a time, or both.
    Possible values are: DateTimeViewKind.Date and DateTimeViewKind.Time.
  • date: Date
    The currently displayed/selected date.
  • time: Date
    The currently displayed/selected time.
  • shortDate: boolean
    Defines if the control displays a short date like '3/21/24' or a long date like 'Friday, March 21, 1997'.
  • format: string
    Specify format for displayed date/time. Here you can find formatting syntax explained.
  • droppedDown: boolean (read-only)
    Indicates wheather the drop-down date-time picker is shown.

Methods:

  • dropDown(handler: ()=> any)
    Registers an event handler that is triggered after drop-down date/time picker is opened.
  • closeUp(handler: ()=> any)
    Registers an event handler that is triggered after drop-down date/time picker is closed.
  • change(handler: ()=> any)
    Registers an event handler that is triggered after the date/time value is changed.