0

I have a requirement of implementing Multiple Month View which shows two months calendar side by side exactly like RangePicker but to be able to choose only single date, not a range.

I have made a Sandbox

If anyone has worked on such solution, please help.

Thanks.

iphonic
  • 12,615
  • 7
  • 60
  • 107

2 Answers2

0

I worked on something similar recently. I made an override to the Ant CMS for the range selection blue background. I just kept the styling for the dates that are clicked, and I just kept the two selected dates instead of the entire range.

It's a hack, but it worked fine and I've yet to run into any issues with it.

Bojan Ivanac
  • 1,170
  • 8
  • 17
  • 2
    Yes I know a hack required it would be nice if you could share piece of code you changed, though it's not a good idea if we need to update the library things will be overridden. – iphonic Oct 11 '18 at 13:34
  • @iphonic Ugh, can't really go digging through the code right now. You don't have to edit anything in the lib files, you can just override the CSS in your own CSS file. I think the element that needed the restyling was the ::before pseudo-element of the "ant-calendar-in-range-cell" class. So basically what I did was just .ant-calendar-in-range-cell::before {background-color: #fff}. Not sure if I used !important to override it or not. – Bojan Ivanac Oct 11 '18 at 13:38
0

Set allowEmpty={[false, true]} disabled={[false, true]}

Demo

Sonic.S.Xiang
  • 317
  • 3
  • 5