Skip to content
Permalink
Browse files

feat(MdDatepicker): add dateformat (#1436)

  • Loading branch information...
Samuell1 authored and marcosmoura committed Jan 24, 2018
1 parent 70b3aa2 commit 74aee2349f75dc5fd9262a002b3f5bff18330b1d
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/components/MdDatepicker/MdDatepicker.vue
@@ -96,9 +96,10 @@
dateToHTMLString (date) {
if (date) {
let formattedDate = null
const dateFormat = this.$material.locale.dateFormat || 'YYYY-MM-DD'
try {
formattedDate = format(date, 'YYYY-MM-DD')
formattedDate = format(date, dateFormat)
} catch (error) {
Vue.util.warn(`The datepicker value is not a valid date. Given value: ${date}.`, this)
}

0 comments on commit 74aee23

Please sign in to comment.
You can’t perform that action at this time.