Member-only story
Ant Design Vue — Date Picker and Form
3 min readJan 13, 2021
Ant Design Vue or AntD Vue, is a useful UI framework made for Vue.js.
In this article, we’ll look at how to use it in our Vue apps.
Extra Footer on the Date Picker
We can add an extra footer on the date picker by populating the renderExtraFooter
slot:
<template>
<div>
<a-date-picker>
<template slot="renderExtraFooter">extra footer</template>
</a-date-picker>
</div>
</template>
We can do the same with the a-range-picker
, a-week-picker
, and a-month-picker
.
Date Picker Date Format
We can format the date picker’s date format our way with Moment:
<template>
<div>
<a-date-picker :default-value="moment('2020/01/01', dateFormat)" :format="dateFormat"/>
<br>
<a-date-picker
:default-value="moment('01/01/2020', dateFormatList[0])"
:format="dateFormatList"
/>
<br>
<a-month-picker :default-value="moment('2020/01', monthFormat)" :format="monthFormat"/>
<br>
<a-range-picker
:default-value="[moment('2020/01/01', dateFormat), moment('2015/01/01', dateFormat)]"
:format="dateFormat"
/>
</div>
</template>
<script>
import moment from "moment";
export default {
data() {
return {
dateFormat…