| FoxitPDFSDKforWeb v11.0.6 Archives Foxit PDF SDK for Web

Public Member Functions | Protected Attributes | List of all members
IDateTimePicker Class Referenceabstract
PDFViewCtrl » viewerui

An abstract class for implementing a date and time picker component. . More...

## Public Member Functions
abstract void | close ()
| Closes the date and time picker. More...
| constructor (pdfViewer, format)
abstract boolean | containsElement (element)
| Checks if a given HTML element is part of the date and time picker component. More...
abstract void | destroy ()
| Destroys the date and time picker component, releasing any resources. More...
abstract boolean | isOpen ()
| Checks whether the date and time picker is currently open. More...
abstract | onChange (callback)
| Registers a callback function to be called when the date and time picker value changes. More...
abstract void | open (option)
| Opens the date and time picker with the specified options. More...

## Protected Attributes
boolean | showDate
| Indicates whether the date field is visible.
boolean | showHour
| Indicates whether the hour field is visible.
boolean | showMinute
| Indicates whether the minute field is visible.
boolean | showMonth
| Indicates whether the month field is visible.
boolean | showSeconds
| Indicates whether the seconds field is visible.
boolean | showTimePeriod
| Indicates whether the time period (AM/PM) field is visible.
boolean | showYear
| Indicates whether the year field is visible.
boolean | time24Hour
| Indicates whether the time format is 24-hour.

## Detailed Description

An abstract class for implementing a date and time picker component. .

Since
  11.0.0

## Member Function Documentation

## ◆ close()

abstract void IDateTimePicker::close | ( |  | ) |
| pure virtual

Closes the date and time picker.

Returns
  void -

## ◆ constructor()

IDateTimePicker::constructor | ( | pdfViewer | ,
|  | format |
| ) |  |

Parameters

  pdfViewer | PDFViewer - The instance of the PDFViewer.
  format | string - The date and time format specified in the annotation property. The picker will be configured to display the fields according to the format string.

## ◆ containsElement()

abstract boolean IDateTimePicker::containsElement | ( | element |  | ) |
| pure virtual

Checks if a given HTML element is part of the date and time picker component.

Parameters

  element | HTMLElement - The element to check.

Returns
  boolean - True if the element is part of the picker, false otherwise.

## ◆ destroy()

abstract void IDateTimePicker::destroy | ( |  | ) |
| pure virtual

Destroys the date and time picker component, releasing any resources.

Returns
  void -

## ◆ isOpen()

abstract boolean IDateTimePicker::isOpen | ( |  | ) |
| pure virtual

Checks whether the date and time picker is currently open.

Returns
  boolean - True if the picker is open, false otherwise.

## ◆ onChange()

abstract IDateTimePicker::onChange | ( | callback |  | ) |
| pure virtual

Registers a callback function to be called when the date and time picker value changes.

Parameters

  callback | (value:PDFDate)=>void - The callback function that will receive the updated value (type: PDFDate).

Returns
  ()=>void - A function to unregister the callback.

## ◆ open()

abstract void IDateTimePicker::open | ( | option |  | ) |
| pure virtual

Opens the date and time picker with the specified options.

Parameters

  option | OpenDateTimePickerOption - The options for opening the picker, such as container, position, and initial date.

Returns
  void -

@2025 Foxit Software Incorporated. All rights reserved.