A Vue component of formatting dates using moment

el-moment

A Vue component of formatting dates using moment.

Installation

yarn add el-moment moment
# npm i el-moment moment -S

Usage

import ElMoment from 'el-moment'

Vue.use(ElMoment)
// or
Vue.component(ElMoment.name, ElMoment)

<!-- component -->
<el-moment v-model="date" format="MMMM Do YYYY, h:mm:ss a">
  <el-date-picker></el-date-picker>
</el-moment>

<!-- native input -->
<el-moment v-model="date" format="MMMM Do YYYY, h:mm:ss a">
  <input type="text">
</el-moment>

No extra HTML tag is generated

License

MIT

GitHub

https://github.com/ElementUI/el-moment