492 questions
0
votes
0
answers
43
views
react date picker component fails with an error invalid hook call [closed]
I am trying to use React - Date picker npm module and below is my code.
using the datepicker in a class component fails with an invalid hook error.
Here is the code:
import React, { Component, ...
0
votes
1
answer
32
views
TypeError: i2.props.onFocus is not a function
I am importing ReactDatePicker like this const ReactDatePicker = lazy(() => import('react-datepicker'));
Using same code in two different components. It's giving TypeError in one component but not ...
0
votes
0
answers
19
views
React-Dates DateRangePicker: Start Date Appears Disabled When Switching from End Date
I am using the library 'react-dates' DateRangePicker in my React project.
I have implemented logic where:
The start date should be selectable at any time.
The end date should only be selectable after ...
1
vote
1
answer
136
views
Error with React-TailwindCSS Datepicker in React 18: Cannot read properties of undefined
I am trying to add the react-tailwindcss-datepicker to my project by following the documentation here:
https://react-tailwindcss-datepicker.vercel.app/install
However, I'm encountering the following ...
0
votes
1
answer
46
views
DatePicker: Dynamic Border Color Based on Validation
I'm using react-datepicker and react-input-mask to create a controlled date input. I want to update the input border color dynamically:
Default state: Initial styles.
On focus: When the input is ...
0
votes
1
answer
43
views
Dynamic import react-datepicker with next/dynamic
I want to dynamic import react-datepicker with the following:
import dynamic from 'next/dynamic';
const DatePicker = dynamic(() => import('react-datepicker').then(mod => mod.default), { ssr: ...
0
votes
1
answer
44
views
Common component react-datepicker inclusion for React application
I have common react-components like Button, Checkbox, Datepicker etc.,. I am transpiling using the rollup.config.js. For date picker I am using react-datepicker. All these components are used in all ...
0
votes
0
answers
58
views
Conditionally add props to React-Datepicker
I want to apply selectsRange prop to react-datepicker only when the viewMode is 'date'
I have done something like
type ViewMode = 'date' | 'month' | 'year';
const [viewMode, setViewMode] = useState<...
0
votes
0
answers
62
views
react datepicker's inline property causing automatic bottom scroll. how to prevent that?
I need to show calender for available dates in react. For that I have used react-datepicker library as below on my page.
//in state
availableDates: [
new Date("2024-08-14"),
...
0
votes
0
answers
84
views
react-datepicker calendar popper not taking proper position due to ag-grid table view
We are rendering react-datepicker inside ag-grid table field issue is if i pass popperPlacement prop to datepicker it's not affecting in UI any value it's showing same for all position.That's why in ...
1
vote
0
answers
43
views
antd Trigger onChange event manually instead of waiting for clicks
I'm using antd RangePicker version 3.22.0. I've defined an onCalendarChange function that given a single choice, forces the other choice, thus negating the need for a second click.
Problem is, the ...
0
votes
0
answers
48
views
antd RangePicker sometimes does not show EndDate
I'm using antd RangePicker version 3.22.0. I'm encountering a strange graphic behavior: When the first date is chosen, but the second is not, somtimes this appears:
the end date 'disappears' and goes ...
1
vote
1
answer
96
views
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) in custom npm package
I'm working on a custom npm package (private) with a theme so I can use it across all my projects.
I'm using react-datepicker in my package to create a custom DatePicker component
I have no trouble ...
-1
votes
1
answer
116
views
In a react typescript code, i am getting ts 2322
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
import { DatePicker } from '@mui/x-date-pickers/...
3
votes
1
answer
137
views
Why is excludScrollbar property required for react-datepicker?
I want to make a wrapper for a component. To pass all its properties I use DatePickerProps from the react-datepicker import. Why is the excludeScrollbar property required?
https://codesandbox.io/p/...