Questions tagged [react-datepicker]

React datepicker is a useful component that displays a simplified datepicker, it allows the user to select a date easily without having to know the format that the input expects.

React Datepicker

A simple and reusable datepicker component for React.

Installation

The package can be installed via NPM:

npm install react-datepicker --save

Or by using Yarn:

yarn add react-datepicker

Below are examples which also can be edited directly via the editor on the left side and will be rendered on the right.

Demo Here

490 questions
1
vote
2 answers

React datepicker throwing invalid time value

I have a react form where I'm using react-datepicker, when I try to populate the value of the date field coming from the database I get the error invalid time value. I have tried several time formats but to no avail. My solution below.
Martins
  • 110
  • 1
  • 9
1
vote
1 answer

Cannot select date range in react-date-range plugin

I am using react-date-range plugin to select a date range in a application. It is shown as follows. export function Dashboard() { historyDate = []; historyAmount = []; const [dashboardSummary] = useDashboardSummary(); const…
Ruchira Nawarathna
  • 1,137
  • 17
  • 30
1
vote
3 answers

React datetime format not working when sending date as url parameter to API

i am trying to pass date time value as url parameter to backend java api , I am using GET method to send request. But at the api end i am getting only part of date time string, other part of date time string is cutting off. my react code const…
pappu_kutty
  • 2,378
  • 8
  • 49
  • 93
1
vote
0 answers

React DatePicker Issue in MS Edge

I have built a react app which is working fine in Chrome, however due to "Request time out" issue only in Chrome and not in Edge, users started using app in Edge. However in Edge, react datepicker is throwing "RangeError: Invalid time value". This…
NKapoor
  • 63
  • 7
1
vote
2 answers

Why does Cypress not recognise the testid of a react-datepicker element?

Target To make Cypress recognise and manipulate a DatePicker element. Problem I cannot make Cypress recognise the data-testid of a DatePicker element, and so have no way of testing it E2E. Error Timed out retrying: Expected to find element:…
Jules
  • 303
  • 2
  • 13
1
vote
2 answers

Creating a DatePicker from CDN with React API

I am importing some React modules from CDN (that's not a requirement, I've also tried with a local build, more in the final question about it):