Skip to content

Conversation

sators
Copy link

@sators sators commented Aug 23, 2017

This creates the prop dateClasses which takes an array of objects for setting custom class names on specific dates:

<InfiniteCalendar dateClasses={[{
      className: "my-class-1",
      dates: [new Date(2017, 1, 8), new Date(), new Date(2017, 5, 17)],
    },{
      className: "my-class-2",
      dates: [new Date(2017, 1, 9), new Date(), new Date(2017, 5, 17), new Date(2017, 5, 20)]
    }]}
/>

Will result in .my-class-1 and .my-class-2 being attached to the specified <Day /> component accordingly. Supports multiple classes for the same date.

Let me know what you think!

@sators sators changed the title Add ability for custom CSS classes on specific dates Add prop for custom CSS classes on specific dates Aug 23, 2017
@cosivox
Copy link

cosivox commented Sep 21, 2017

Hi @sators. Do you know how could I install the package with this PR merged?

@sators
Copy link
Author

sators commented Sep 21, 2017

@cosivox You can try:

npm install --save git://github.com/sators/react-infinite-calendar.git#build

...and view the updated docs at: https://github.com/sators/react-infinite-calendar

@cosivox
Copy link

cosivox commented Sep 21, 2017

@sators Thank you!

@yarnball
Copy link

Amazing work, this is a super handy feature

@AldoGonzalez
Copy link

@cosivox You can try:

npm install --save git://github.com/sators/react-infinite-calendar.git#build

...and view the updated docs at: https://github.com/sators/react-infinite-calendar

This not work for me. Does this still work?

@sators
Copy link
Author

sators commented May 26, 2020

@AldoGonzalez It should - what errors are you getting back?

@AldoGonzalez
Copy link

AldoGonzalez commented May 26, 2020

@AldoGonzalez It should - what errors are you getting back?

I use yarn add react-infinite-calendar react-addons-css-transition-group
Then when I use npm install --save git://github.com/sators/react-infinite-calendar.git#build I get:

undefined ls-remote -h -t git://github.com/sators/react-infinite-calendar.git

The lib still works fine, but this improve is not include.

@sators
Copy link
Author

sators commented May 26, 2020

@AldoGonzalez Until this PR merges, if you want to use it, you will need to remove the install of react-infinite-calendar and only have 1 installation of the library, which is installed via the git URL above.

@AldoGonzalez
Copy link

AldoGonzalez commented May 26, 2020

@AldoGonzalez Until this PR merges, if you want to use it, you will need to remove the install of react-infinite-calendar and only have 1 installation of the library, which is installed via the git URL above.

Okey, but what URL I have to use?

I remove the lib and when I install this: npm install --save git://github.com/sators/react-infinite-calendar.git#build
I get:

undefined ls-remote -h -t git://github.com/sators/react-infinite-calendar.git

@sators
Copy link
Author

sators commented May 27, 2020

@AldoGonzalez Sounds like a git problem with your local config - see https://stackoverflow.com/a/53247720/659188

@AldoGonzalez
Copy link

@AldoGonzalez Sounds like a git problem with your local config - see https://stackoverflow.com/a/53247720/659188

FINALLY works! The problem was git.. thanks man! This improvement saved my life!

@sators
Copy link
Author

sators commented Jul 20, 2021

bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants