CalendarPicker
CalendarPicker copied to clipboard
how to predefine a range dates and allow user only to select those dates
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" />
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