mirror of
https://github.com/tenrok/vue2-datepicker.git
synced 2026-06-24 08:20:37 +03:00
fix: fecha.format need a date
This commit is contained in:
+6
-2
@@ -272,8 +272,12 @@ export default {
|
|||||||
this.displayPopup()
|
this.displayPopup()
|
||||||
},
|
},
|
||||||
stringify (date, format) {
|
stringify (date, format) {
|
||||||
format = format || this.format
|
try {
|
||||||
return fecha.format(date, format)
|
format = format || this.format
|
||||||
|
return fecha.format(new Date(date), format)
|
||||||
|
} catch (e) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
},
|
},
|
||||||
parseDate (value, format) {
|
parseDate (value, format) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user