Skip to main content Skip to docs navigation

Events

On this page

These events may provide additional details. For native javascript you can get this data via e.details.*. For jQuery the details are directly in the event, e.g. e.date

Each of these events inherit from the BaseEvent interface.

    
interface BaseEvent {
  type: string; //e.g. change.td
  viewMode?: keyof ViewMode //'clock' | 'calendar' | 'months' | 'years' | 'decades'
}
    
  

change.td

Emit when the date selection is changed.

    
interface ChangeEvent extends BaseEvent {
  date: DateTime | undefined;
  oldDate: DateTime;
  isClear: boolean;
  isValid: boolean;
}
    
  

update.td

Emits when the view changes for example from month view to the year view.

    
interface ViewUpdateEvent extends BaseEvent {
  viewDate: DateTime;
}
    
  

error.td

Emits when a selected date or value from the input field fails to meet the provided validation rules.

    
interface FailEvent extends BaseEvent {
  reason: string;
  date: DateTime;
  oldDate: DateTime;
}
    
  

show.td

Emits when then picker widget is displayed.

hide.td

Emits when the picker widget is hidden.

    
interface HideEvent extends BaseEvent {
  date: DateTime;
}