typings/lib2/messagev2/field/timePickerField.js

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TimePickerField = void 0;
const internal_1 = require("../internal");
/**
 * Represents a time picker field.
 * @extends EditableField
 */
class TimePickerField extends internal_1.EditableField {
    /**
     * Creates an instance of the TimePickerField class.
     * @param {string} id The unique identifier of the field.
     * @param {string} label The label of the field.
     */
    constructor(id, label) {
        super(id);
        this.displayType = 'timePicker';
        this.setLabel(label);
    }
    /**
     * Gets the minTime value of the field.
     * @returns {string} The minTime value of the field.
     */
    getMinTime() {
        return this.minTime;
    }
    /**
     * Sets the minTime value of the field. Time format should be hh:mm.
     * @param {string} minTime The minTime value to set, using format hh:mm.
     * @returns The updated instance of the TimePickerField.
     */
    setMinTime(minTime) {
        this.minTime = minTime;
        return this;
    }
    /**
     * Gets the maxTime value of the field.
     * @returns {string} The maxTime value of the field.
     */
    getMaxTime() {
        return this.maxTime;
    }
    /**
     * Sets the maxTime value of the field. Time format should be hh:mm.
     * @param {string} maxTime The maxTime value to set, using format hh:mm.
     * @returns The updated instance of the TimePickerField.
     */
    setMaxTime(maxTime) {
        this.maxTime = maxTime;
        return this;
    }
    /**
     * Gets the defaultValue value of the field.
     * @returns {string} The defaultValue value of the field.
     */
    getDefaultValue() {
        return this.defaultValue;
    }
    /**
     * Sets the defaultValue value of the field.
     * @param {string} defaultValue The defaultValue value to set.
     * @returns The updated instance of the TimePickerField.
     */
    setDefaultValue(defaultValue) {
        this.defaultValue = defaultValue;
        return this;
    }
}
exports.TimePickerField = TimePickerField;