From c78e445a24e4b7e2fc842c4306fd06792467191f Mon Sep 17 00:00:00 2001 From: Tsanie Lily Date: Wed, 27 Mar 2024 10:09:25 +0800 Subject: [PATCH] add: comments --- lib/ui/date.js | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/lib/ui/date.js b/lib/ui/date.js index 33506d8..c973077 100644 --- a/lib/ui/date.js +++ b/lib/ui/date.js @@ -145,7 +145,33 @@ export function getDateValue(element, formatter) { */ export class DateSelector { _var = { - options: null + /** + * @type {HTMLInputElement} + * @private + */ + el: null, + options: { + /** + * @type {boolean?} + * @private + */ + enabled: true, + /** + * @type {string?} + * @private + */ + minDate: null, + /** + * @type {string?} + * @private + */ + maxDate: null, + /** + * @type {DateFormatterCallback?} + * @private + */ + valueFormatter: null + } }; /** @@ -256,6 +282,11 @@ export class DateSelector { this._var.options.maxDate = date; } + /** + * @private + * @param {Date} date + * @returns {Date | any} + */ _getDate(date) { if (date instanceof Date && !isNaN(date)) { const year = date.getUTCFullYear();