Options
Menu

Hierarchy

  • UpDateTimeMainEditControl
    • UpDateTimeEditControl

Index

Accessors

required

  • get required(): boolean
  • set required(value: boolean): void
  • Gets the control's required state.

    Returns boolean

  • Sets the control's required state

    Parameters

    • value: boolean

    Returns void

Methods

checkValidity

  • checkValidity(): Promise<ValidationInfo>
  • Checks if the value matches the format and is in range of values.

    example
    const validityResult = await ix.util.getUp("<GUID>").checkValidity();
    
    // example of `validityResult` - the entered value has wrong format
    ValidationInfo {
      valStatus: false,
      valMessage: 'Entry does not correspond to required format. Format: dd.MM.yyyy',
      valType: 'pattern'
    }
    

    Returns Promise<ValidationInfo>

closePicker

  • closePicker(): void
  • Closes the picker.

    Returns void

getDateObject

  • getDateObject(value?: string): undefined | Date
  • Get the current value of the control or given value as JavaScript date object.

    example
    ix.util.getUp("<GUID>").getDateObject("22.02.2022");
    
    // Returns a date object:
    `Tue Feb 22 2022 00:00:00 GMT+0100 (Central European Standard Time)`
    

    Parameters

    • Optional value: string

    Returns undefined | Date

getValue

  • getValue(): string
  • Returns the value of the field.

    Returns string

openPicker

  • openPicker(): void
  • Opens the picker.

    Returns void

reportValidity

  • reportValidity(): Promise<void>
  • Checks and reports validity.
    Useful if the field's value was changed without triggering changes.

    Returns Promise<void>

setDateObject

  • setDateObject(val: Date, settings?: { triggerOnchange?: "disabled" | "strict" | "always" }): void
  • Set value of the control.

    deprecated

    Please use setValue instead!

    Parameters

    • val: Date
    • Optional settings: { triggerOnchange?: "disabled" | "strict" | "always" }
      • Optional triggerOnchange?: "disabled" | "strict" | "always"

    Returns void

setValue

  • setValue(value: string | Date, settings?: { triggerOnchange?: "disabled" | "strict" | "always" }): void
  • Sets a value for the control.

    Parameters

    • value: string | Date

      The value must be either a string (in the same format the field is configured with) or an date object.
      NOTE: If the value doesn't match the field's format, no value will be set.

    • Optional settings: { triggerOnchange?: "disabled" | "strict" | "always" }
      • Optional triggerOnchange?: "disabled" | "strict" | "always"

    Returns void

toLocalFormat

  • toLocalFormat(date: Date): string
  • Converts a JavaScript date object to a string like 22.02.2022.

    note

    The output depends on the field's format settings.

    example
    // convert a given date object
    ix.util.getUp("<GUID>").toLocalFormat(new Date(2022, 01, 22));
    
    // returns
    '22.02.2022'
    

    Parameters

    • date: Date

    Returns string