Skip to content

Commit

Permalink
BUG: Fixed empty value error
Browse files Browse the repository at this point in the history
  • Loading branch information
edisdev committed Aug 9, 2021
1 parent 1460e67 commit fcd8606
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 17 deletions.
10 changes: 5 additions & 5 deletions lib/vuedatepickerui.common.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/vuedatepickerui.common.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/vuedatepickerui.css

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions lib/vuedatepickerui.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/vuedatepickerui.umd.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/vuedatepickerui.umd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/vuedatepickerui.umd.min.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/components/datepicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ export default {
padding: 0;
cursor: pointer;
border: none;
background: transparent;
}
.v-calendar .input-field .clearButton svg {
Expand Down
4 changes: 2 additions & 2 deletions src/utils/formatDate.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
* @return {String} // formatted value
*/
export default function (date, options = {}) {
const { value, range, lang, dateFormat } = options
const { selectedDate, range, lang, dateFormat } = options

if (!date) return null
if (range && value.filter(Boolean).length === 0) return null
if (range && selectedDate.filter(Boolean).length === 0) return null
const result = new Date(date).toLocaleDateString(lang, {
...dateFormat
})
Expand Down

0 comments on commit fcd8606

Please sign in to comment.