CalendarPicker icon indicating copy to clipboard operation
CalendarPicker copied to clipboard

how to predefine a range dates and allow user only to select those dates

Open PrabhakarKotipalli opened this issue 3 years ago • 1 comments

I am giving selectedstartdate and selectedenddate so that I get a range. I dont want user to set his range. user should be able to select the dates only in my range.

<CalendarPicker startFromMonday={true} allowRangeSelection={true} selectedStartDate = {minDate} selectedEndDate = {maxDate} minDate = {minDate} maxDate ={maxDate} datestyle disabledDates = {[new Date(2021, 2, 13),new Date(2021, 2, 11)]} dayShape = {'square'} dayLabelsWrapper = {{borderWidth:0,borderColor:'white'}} selectedRangeStartStyle={{backgroundColor:'#421782'}} textStyle = {{color:'#B4B4B4',fontFamily: "Montserrat-Bold"}} selectedDayColor = '#F3F6FF' selectedDayTextColor="#FFFFFF" />

PrabhakarKotipalli avatar Mar 10 '21 07:03 PrabhakarKotipalli

Use minDate and maxDate props, but don't pass in selectedStartDate. User selection will fire callbacks that return selected dates. If you want to color the date range, use customDatesStyles

peacechen avatar Mar 10 '21 15:03 peacechen