2
0
mirror of https://github.com/tenrok/vue2-datepicker.git synced 2026-06-10 19:32:28 +03:00

fix: stringify function returns a error value,when date is null (#244)

This commit is contained in:
mengxiong10
2019-02-01 20:58:36 +08:00
parent 6214970364
commit 92243ab776
+3
View File
@@ -55,6 +55,9 @@ export function formatTime (time, type = '24', a = 'a') {
}
export function formatDate (date, format) {
if (!date) {
return ''
}
try {
return fecha.format(new Date(date), format)
} catch (e) {