2
0
mirror of https://github.com/tenrok/vue2-datepicker.git synced 2026-06-21 01:42:03 +03:00

Merge branch 'master' into dev

This commit is contained in:
mengxiong10
2020-02-18 16:24:12 +08:00
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -193,14 +193,14 @@ You can also override some of the default locale by `lang`.
the `format` accepts an object to customize formatting.
```html
<date-picker :format="momentForamt" />
<date-picker :format="momentFormat" />
```
```js
data() {
return {
// Use moment.js instead of the default
momentForamt: {
momentFormat: {
// Date to String
stringify: (date) => {
return date ? moment(date).format('LL') : ''
+2 -2
View File
@@ -191,14 +191,14 @@ import 'vue2-datepicker/locale/zh-cn';
`format` 接受一个对象去自定义格式化
```html
<date-picker :format="momentForamt" />
<date-picker :format="momentFormat" />
```
```js
data() {
return {
// 使用moment.js 替换默认
momentForamt: {
momentFormat: {
// Date to String
stringify: (date) => {
return date ? moment(date).format('LL') : ''