uselessdev / datepicker

A simple datepicker with Chakra-UI and date-fns

Home Page:https://uselessdev-datepicker.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

should be possible to have more than one variant ('today', 'range', 'selected') at the same time

nlfonseca opened this issue Β· comments

First of all, great datepicker built with chakra πŸ‘

on the useCalendarDay in my opinion variant should be an array since is possible to have two variants at the same time
['today', 'selected'] or ['today', 'range']

example of MUI with variant, 'today' and 'range'.

image

Hi, @nlfonseca thanks for opening this issue.

By the way chakra-ui handle with variants we can't have two variants at the same time for one component, so, to be able to do something like this we can't use variants

A possible approach to do this would be using a custom component for day, you can see an example of use here: https://github.com/uselessdev/datepicker/blob/main/src/calendar.stories.tsx#L763-L828