fenextjs-date
Advanced tools
Comparing version 3.0.0 to 3.1.0
@@ -38,2 +38,7 @@ export interface FenextjsDateFormatOptions extends Intl.DateTimeFormatOptions { | ||
onGenerateDateByCalendar(date?: FenextjsDateValue): Date[]; | ||
onValidateMinMax({ date, max, min, }: { | ||
min?: Date; | ||
max?: Date; | ||
date?: Date; | ||
}): boolean; | ||
} |
@@ -119,4 +119,15 @@ "use strict"; | ||
} | ||
onValidateMinMax({ date, max, min, }) { | ||
const d = date ?? this.date; | ||
let sw = true; | ||
if (min) { | ||
sw &&= min <= d; | ||
} | ||
if (max) { | ||
sw &&= max >= d; | ||
} | ||
return sw; | ||
} | ||
} | ||
exports.FenextjsDate = FenextjsDate; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "fenextjs-date", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./cjs/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12295
174