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

fix: fecha.format need a date

This commit is contained in:
mxie
2018-07-04 21:54:21 +08:00
parent 07fdcf7133
commit 1e54efc094
+6 -2
View File
@@ -272,8 +272,12 @@ export default {
this.displayPopup()
},
stringify (date, format) {
format = format || this.format
return fecha.format(date, format)
try {
format = format || this.format
return fecha.format(new Date(date), format)
} catch (e) {
return ''
}
},
parseDate (value, format) {
try {