Skip to content

Requesting code review for RAC date picker customization #4914

Answered by devongovett
binaryartifex asked this question in Q&A
Discussion options

You must be logged in to vote

If you're not using the date segments I guess I wouldn't use the DateRangePicker component at all. You could just use a button that triggers a popover yourself, e.g. using DialogTrigger.

Pseudo code:

let [value, setValue] = useState(...);

<DialogTrigger>
  <Button>{formatDateValue(value)}</Button>
  <Popover>
    <Dialog>
      <RangeCalendar value={value} onChange={setValue} />
    </Dialog>
  </Popover>
</DialogTrigger>

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@binaryartifex
Comment options

@binaryartifex
Comment options

Answer selected by binaryartifex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants