vue-functional-calendar icon indicating copy to clipboard operation
vue-functional-calendar copied to clipboard

updating markedDateRange prop values doesn't change the calendar

Open syldman opened this issue 3 years ago • 3 comments

I tried quite a bunch of ways:

  • updating :calendar prop
  • updating :config prop
  • updating :value prop
  • calling .updateCalendar()

and only re-rendering of the whole component worked

BTW: great job and thanks!

syldman avatar Jul 29 '20 15:07 syldman

me neither (version: 2.8.88)

someone says 'using :key solves the issue', but that makes other issues

Gamsake avatar Aug 31 '20 09:08 Gamsake

+1

didotsonev avatar Dec 10 '20 12:12 didotsonev

I have a same issue when trying to update the configs, and successfully make it works by using vue watch cycle.

<!-- view -->
<functional-calendar
  ref="Calendar"
  v-model="calendar"
  :configs="calendarConfigs">
</functional-calendar>

Just manipulate the calendarConfigs value, e.g. change limits, etc...

And here is the main point to make it works.

watch: {
  calendarConfigs: {
    deep: true, 
    handler() {
      this.$refs.Calendar.setConfigs();
    }
  }
}

That's it.

Hope can help anyone who have the same problem.

ngekoding avatar Jun 30 '21 12:06 ngekoding

Hello. Thanks for your feedback. Now I don't have time to deal with the calendar. Please create pull requests, I will appreciate it, it will be useful for the community.

ManukMinasyan avatar Nov 02 '22 12:11 ManukMinasyan