typings/lib2/messagev2/field/datePickerField.js

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DatePickerField = void 0;
const internal_1 = require("../internal");
/**
 * Represents a date picker field.
 * @extends EditableField
 */
class DatePickerField extends internal_1.EditableField {
    /**
     * Creates an instance of the DatePickerField class.
     * @param {string} id The ID of the date picker field.
     */
    constructor(id, label) {
        super(id);
        this.displayType = 'datePicker';
        this.setLabel(label);
    }
    /**
     * Gets the minimum date value.
     * @returns {string} The minimum date.
     */
    getMinDate() {
        return this.minDate;
    }
    /**
     * Sets the minimum date value. Date format should be yyyy-mm-dd.
     * @param {string} minDate The minimum date to set, using format yyyy-mm-dd.
     * @returns The updated instance of the DatePickerField.
     */
    setMinDate(minDate) {
        this.minDate = minDate;
        return this;
    }
    /**
     * Gets the maximum date value.
     * @returns {string} The maximum date.
     */
    getMaxDate() {
        return this.maxDate;
    }
    /**
     * Sets the maximum date value. Date format should be yyyy-mm-dd.
     * @param {string} maxDate The maximum date to set, using format yyyy-mm-dd.
     * @returns The updated instance of the DatePickerField.
     */
    setMaxDate(maxDate) {
        this.maxDate = maxDate;
        return this;
    }
    /**
     * Gets the default value of the field.
     * @returns {string} The default value.
     */
    getDefaultValue() {
        return this.defaultValue;
    }
    /**
     * Sets the default value of the field.
     * @param {string} defaultValue The default value to set.
     * @returns The updated instance of the DatePickerField.
     */
    setDefaultValue(defaultValue) {
        this.defaultValue = defaultValue;
        return this;
    }
}
exports.DatePickerField = DatePickerField;