UNPKG

@rnwonder/react-date-picker

Version:

A simple and reusable Datepicker component for ReactJS ([Demo](https://stackblitz.com/edit/solidjs-templates-dof6jl?file=src%2FApp.tsx))

2 lines (1 loc) 463 B
"use strict";const e=require("react/jsx-runtime"),t=require("react");module.exports=function(r,s,u){const c=t.useRef(null);if(t.useEffect((()=>{c.current&&(null==u||u((e=>[...e,c.current])))}),[u]),s){if("function"==typeof s){const t=s({...r,setRefToAllowOutsideClick:c,multipleDates:r.multipleObject,endDate:r.endDay,selectedDate:r.startDay});return e.jsx("div",{"data-type":"custom-jsx",children:t})}return e.jsx("div",{"data-type":"custom-jsx",children:s})}};