0

I am trying to to update/change the highlighted days in callendar view. But they are not updated on next event when calendar is shown.

There is working Plunker snippet: https://plnkr.co/edit/4HkCp5?p=preview

Part of code:

var element = $("#datetimepicker");
      //element.datetimepicker('destroy');
      element.datetimepicker({
        'setOptions': {
          highlightedDates: ["08/10/2016,,xdsoft_highlighted_mint", "10/10/2016,,xdsoft_highlighted_mint"]
        }
      });

How can I make that the highlights were updated after setting the new value to "highlightedDates"?

Some realated questions:

Note: I can not use "element.datetimepicker('destroy')" because it will destroy all data and I only need to update highlights.

Community
  • 1
  • 1
Drasius
  • 825
  • 1
  • 11
  • 26

1 Answers1

1

Found solution... So problem is that when new value of highlightedDays is empty array, then the "highlightedDays" value is not updated. So you need always some dummy value to update previous value.

This is like a hack, but works. I am passing dummy date from 1970`th, so no one cares about it...

Drasius
  • 825
  • 1
  • 11
  • 26