For vue2 projects, use @94ai/common-ui
LLMs.md

nf-date-picker ​

Half-year and week-range pickers complement the missing Element Plus date types. Use native ElDatePicker types week, quarter, quarterrange, year, and yearrange for the other periods.

Examples ​

Loading example…

Values ​

A half-year value is January 1 or July 1. Half-year ranges contain two sorted half-year start dates. Week ranges use the date-range panel to select two dates and expand to the first day of the first week and the last day of the last week at local midnight. Selecting within one week returns the full week. The week start follows the Element Plus locale; weekStartsOn overrides normalization.

Values are Date or Date[] by default; valueFormat returns formatted strings. Clearing returns null. Half-years are panel-only; disabledDate checks their start dates. Week ranges disable entire weeks containing unavailable days. Native year/quarter panels have four columns; each half-year spans two columns of a four-column grid. Week calendars retain seven days.

Attributes ​

AttributeDescriptionDefault
modelValue / v-modelBound value: Date / string / number / Array / nullnull
typePicker type: halfyear / halfyearrange / weekrangehalfyear
sizeSize: small / default / largedefault
disabledDisabledfalse
clearableAllow clearingtrue
placeholder / startPlaceholder / endPlaceholderSingle/range placeholders—
format / valueFormatDisplay/bound-value format (Day.js)—
disabledDateDisabled-date predicate: (date: Date) => boolean—
defaultValueInitial panel date: Date / [Date, Date]—
weekStartsOnWeek start (0=Sunday, 1=Monday, …6=Saturday)Element Plus locale
teleported / popperClassTeleport to body / additional popup classtrue / —

Events ​

AttributeDescription
update:modelValue / changeValue update / completed selection
calendar-changeRange selection progress: date array, null for an unselected endpoint
visible-changePopup visibility
clear / focus / blurClear / focus / blur

Methods ​

focus() / blur() / handleOpen() / handleClose(): Focus / blur / open / close the panel.