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:
+6
-2
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user