CalendarPicker icon indicating copy to clipboard operation
CalendarPicker copied to clipboard

selectedRangeStart style and selectedRangeEnd style

Open changsu1993 opened this issue 2 years ago • 9 comments

Screen Shot 2022-04-01 at 1 57 18 PM

I want to make the style of the start part and the end part a round circle.

What should I do to make it look like the picture below?

Screen Shot 2022-04-01 at 1 59 31 PM

changsu1993 avatar Apr 01 '22 05:04 changsu1993

any solution? I need ahelp.

GeunwonChoi avatar Apr 21 '22 07:04 GeunwonChoi

image

I solved it by editing the library myself. I think you can do conditional processing in Day.js.

GeunwonChoi avatar Apr 21 '22 08:04 GeunwonChoi

@GeunwonChoi 혹시 어떻게 해결하셨는지.. 자세하게 부탁드려도 괜찮으실까요..? 제가 좀 급해서요.....

changsu1993 avatar Apr 25 '22 11:04 changsu1993

@GeunwonChoi 혹시 어떻게 해결하셨는지.. 자세하게 부탁드려도 괜찮으실까요..? 제가 좀 급해서요.....

Day.js:144 ~ 182라인까지 스케줄에 표시되는 요소들의 스타일 Flag입니다.

예를들어 isThisDaySameAsSelectedStart은 제가 올린 사진의 20일에 해당하는 파란색 Rounded 요소 스타일이고 isThisDaySameAsSelectedEnd도 마찬가지로 29일에 해당하는 파란색 Rounded 요소입니다.

이 Flag를 사용해 해당 파일 198 부터 있는 React.Node들을 수정하면됩니다.

추가 설명을 드리자면 저는 isThisDaySameAsSelectedStart || isThisDaySameAsSelectedEnd의 경우 요소를 absolute 포지션으로 새로 Append해 스타일링 처리를 진행했습니다.

GeunwonChoi avatar Apr 25 '22 11:04 GeunwonChoi

@GeunwonChoi

아 그 말인 즉, 현재 이 라이브러리인 CalendarPicker를 쓴 게 아닌 Day.js로 구현하셨다는 말씀이신가요?!

changsu1993 avatar Apr 25 '22 11:04 changsu1993

@changsu1993 CalendarPicker 라이브러리 포크 후 Day.js 를 수정해서 사용했습니다.

GeunwonChoi avatar Apr 25 '22 12:04 GeunwonChoi

오해하실 것 같아 말씀드리는데, 제가 말씀드린 Day.js는 라이브러리를 말씀드린게 아닙니다. 해당 라이브러리(CalendarPicker)의 Day.js 소스파일을 말씀드린겁니다.

GeunwonChoi avatar Apr 26 '22 02:04 GeunwonChoi

@GeunwonChoi 아..!! 제가 오해했네요!! ㅎㅎ 설명해주셔서 감사합니다! 말씀해주신대로 해보겠습니다!! ㅎㅎ

changsu1993 avatar Apr 26 '22 10:04 changsu1993

image

I solved it by editing the library myself. I think you can do conditional processing in Day.js.

Hi,

I want to highlight previous date and next date by default when user visit the calendar so what are the changes shall I do ?

SanjanaTailor avatar May 10 '22 11:05 SanjanaTailor