vuejs-datepicker: Setting typeable causes date value to go blank

In version 1.2.0.

Steps:

  1. Set the typeable property on picker
  2. Type a date into the picker, hit enter
  3. Use the calendar to enter a date into the picker
  4. Remove focus from the picker
  5. Notice that the picker input is now empty

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 2
  • Comments: 22 (1 by maintainers)

Commits related to this issue

Most upvoted comments

If you select 13 or higher, it is the same blank

Same here

The problem here seems to be in this part of DateInput.vue

    /**
     * nullify the typed date to defer to regular formatting
     * called once the input is blurred
     */
    inputBlurred () {
      if (this.typeable && isNaN(Date.parse(this.input.value))) {
        this.clearDate()
        this.input.value = null
        this.typedDate = null
      }
      this.$emit('closeCalendar')
    },

I patched it to just emit the event. The defering wasn’t working before and it’s working fine now.