Shibu
Shibu

Reputation: 181

Manipulation of antd calendar in react js

How can i highlight the specific dates in the antd calendar..? i can able to hide the dates using "Date.now()" and "current" but can't able to access those dates for customization.enter image description here

Upvotes: 1

Views: 2804

Answers (1)

A G
A G

Reputation: 22579

You can control how to render each cell using dateFullCellRender event. Example

function onFullRender(date){
  const day = date.day();
  let style;
  if(day === 1) {
   style = { border: "1px solid #d9d9d9"};
  }
  else {
   style = { border: "1px solid red"};
  }
  return <div style={style}>{day}</div>;
}

https://codepen.io/anon/pen/RjgWgL?editors=0010

Upvotes: 2

Related Questions