highlightDates does not updating
See original GitHub issueWhy highlightDates property changes doesn’t trigger component update? I have dynamic highlightDates array, after i update it, nothing happens, but should add some class to defined dates.
<DatePicker inline monthsShown={2} highlightDates={dates}
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
Top Results From Across the Web
How to refresh mat-calendar after changing the background of ...
put the mat-calendar component inside a div with the condition that the array of highlight dates is not undefined
Read more >Conditional formatting not reading dates
I have a spreadsheet in which dates have been formatted as dates in the Home tab, and where I already tried using "Text...
Read more >Automatically Highlight Dates from Last Month - Google Support
I need to be able to highlight the dates that are from the previous month so they trigger a visual showing which tasks...
Read more >conditional formatting highlight dates 90 days or less
how do I get the formula to work for D2 through D55? BTW -- thank you for your help! I really appreciate it....
Read more >How to work more productively online using new conditional ...
How to apply the rule online in Excel. Remember, we're working online, not in the desktop version. To apply a conditional formatting rule,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I got one solution, not perfect, but working. First, need to add ref to second datepicker:
<DatePicker inline monthsShown={2} ref={secondDatepickerRef} />
Then you can manipulate with component reference:
highlightDates should be Map instance, where first argument is a date and second - highlighted class.
Possibly cleaner and less breaking for React - add a key property to the datepicker - this will force it to update itself.
key={shortid.generate()}