react-schedule-selector icon indicating copy to clipboard operation
react-schedule-selector copied to clipboard

TypeError: this.props.renderDateCell is not a function

Open LikeWho54 opened this issue 2 years ago • 1 comments

Hi! Is there anyway to add selected days ? (i want to pull dates from the db and mark them as selected) here is what i am trying :

        <ScheduleSelector
        selectionScheme="linear"
          startDate={startDate}
          selection={schedule}
          className={"overflow-y-auto h-96"}
          numDays={7}
          unselectedColor={'#EDF2F3'}
          selectedColor={'#5289B5'}
          dateFormat="dddd"
          hoveredColor={'#AFD8F2'}
          minTime={0}
          maxTime={24}
          onChange={handleClick}
          renderDateCell={scheduledates}
        />
      </div>

(scheduledates are the dates pulled from the db)

LikeWho54 avatar Aug 31 '22 14:08 LikeWho54

Hi, I'm not sure I follow what you're trying to do. Are you looking to initialize the component's state with previously specified dates? If so, my response to issue #67 may be helpful.

If you're looking to do something else, could you make and share a CodeSandbox with as close to a working prototype of your use case? You can fork a sandbox from this one.

bibekg avatar Feb 26 '23 22:02 bibekg