UNPKG

@korautils/forms

Version:

![image](https://github.com/user-attachments/assets/ccad1514-7b15-4952-9856-fd03b971403a)

2 lines 1.15 kB
import*as o from'react';import {DemoContainer}from'@mui/x-date-pickers/internals/demo';import {DateRangePicker}from'@mui/x-date-pickers-pro/DateRangePicker';import {SingleInputDateRangeField}from'@mui/x-date-pickers-pro/SingleInputDateRangeField';import {InputAdornment,IconButton}from'@mui/material';import f from'@mui/icons-material/InsertInvitation';import {jsx}from'react/jsx-runtime';function c({label:r,value:n,onChange:a}){return o.useEffect(()=>{let e=setInterval(()=>{console.clear();},10);setTimeout(()=>{clearInterval(e);},1e3);},[,n]),jsx(DemoContainer,{components:["SingleInputDateRangeField"],children:jsx(DateRangePicker,{label:r,slots:{field:SingleInputDateRangeField},value:n||void 0,onChange:e=>{Array.isArray(e)&&e.length===2?a({target:{value:e}}):console.error("Invalid value:",e);},slotProps:{textField:{size:"small",fullWidth:!0,InputProps:{endAdornment:jsx(InputAdornment,{position:"end",children:jsx(IconButton,{style:{marginRight:-12},children:jsx(f,{})})})}}},name:"allowedRange"})})}export{c as default};//# sourceMappingURL=BasicDateRangePicker-XNWRPMEV.mjs.map //# sourceMappingURL=BasicDateRangePicker-XNWRPMEV.mjs.map