Twipped / Kalendae

A javascript date picker that just works.
MIT License
1.99k stars 285 forks source link

classMap function #194

Open stell opened 7 years ago

stell commented 7 years ago

The classMap function uses a key/value collection of css classes organized by date. What i would love to do ist use a callback function like blackout uses. I have a string like "YNNYNYNYNNNNNNNNNNNYYYYNYNYYYNYNYYYYYY".

First "Y" of that String stands for 01-01-2017 and so on. So the callbackfunction should just return a class like "free" if date matches "Y" and "closed" if it matches "N".

I don't see how that can be done with the key/value collection.