날짜 부분을 변수로 사용하는 방법

Column
Tags
tips
  • 변수를 대괄호로 감싸면 됨.
const date = '2021-02-07'; <Calendar markedDates={{ [date]: { dots: [vacation, massage, workout], selected: true, selectedColor: 'red' }, '2021-02-08': { dots: [vacation, massage, workout], selected: true, selectedColor: 'red' } }} markingType={'multi-dot'} />