bibekg/react-schedule-selector

Need a small version of the schedule selector to be able to choose full 24 hours

Closed this issue · 3 comments

So I like this library but I'm having trouble using it. As you can see below, the column headers are specific dates: 6/10,6/11, 6/12, ... etc.

image

However for my use case I want the user to specify hours within a generic week. So instead of specific dates, I want the column headers to be Monday, Tuesday, ... Friday.

Does this app currently support this use case? If not I can create a PR for it, just wanted to check to see if I'm possibly missing something.

nevermind, figured out how to do this by just using

startDate={new Date('2019-06-10T00:00:00')} dateFormat={'dddd'}

however on another note it would be nice to have a small mode like this...
image

So i've opened up a PR for that

Hi Adrien, thank you so much for pushing through with the PR! I apologize for replying so late, I've been neglecting maintaining this library as I was taking a bit of break from dev work for a while.

As for this feature, would you be able to use the renderDateCell prop to fit your use case instead? Although having a dedicated small mode may make sense, I hesitate to add flag-style props for styling things when it can be done using the existing render-prop pattern.

Good idea @bibekg i haven’t tried using the render prop. That seems like a better solution so I can close this for now and reopen if I have trouble with render props. Great job with the library