Skip to content

DatePicker ​

A range-mode wrapper for element-plus date-picker that splits v-model into v-model:start-date and v-model:end-date, making it easy to bind directly to two separate query parameters.

Basic Usage ​

Properties ​

PropertyDescriptionTypeDefault
v-model:start-dateStart dateDate | string | number | undefined—
v-model:end-dateEnd dateDate | string | number | undefined—
typeRange type'daterange' | 'datetimerange' | 'monthrange''daterange'
value-formatBound value format; datetime ranges preserve the time by defaultstringDate: YYYY-MM-DD; month: YYYY-MM; datetime: YYYY-MM-DD HH:mm:ss
disabledWhether to disablebooleanfalse
start-placeholderPlaceholder for startstringInherited from the Element Plus locale
end-placeholderPlaceholder for endstringInherited from the Element Plus locale
range-separatorRange separatorstringInherited from the Element Plus locale
clearableWhether to show the clear buttonbooleantrue

💡 Multi-version compatibility: The component props extend the public Element Plus DatePicker props. Except for model-value, type, and the two named models, remaining props and events continue to be forwarded, including size, popper-class, disabled-date, and shortcuts.

Events ​

EventDescriptionType
changeTriggered when the value changes; clearing returns [undefined, undefined]Function

Released under the MIT License