add: comments
This commit is contained in:
@ -145,7 +145,33 @@ export function getDateValue(element, formatter) {
|
|||||||
*/
|
*/
|
||||||
export class DateSelector {
|
export class DateSelector {
|
||||||
_var = {
|
_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;
|
this._var.options.maxDate = date;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
* @param {Date} date
|
||||||
|
* @returns {Date | any}
|
||||||
|
*/
|
||||||
_getDate(date) {
|
_getDate(date) {
|
||||||
if (date instanceof Date && !isNaN(date)) {
|
if (date instanceof Date && !isNaN(date)) {
|
||||||
const year = date.getUTCFullYear();
|
const year = date.getUTCFullYear();
|
||||||
|
Reference in New Issue
Block a user