Questions tagged [react-dates]

An easily internationalizable, mobile-friendly datepicker library for the web developed by Airbnb.

An easily internationalizable, mobile-friendly datepicker library for the web developed by Airbnb.

155 questions
1
vote
1 answer

Different Styling Classes for airbnb/react-dates

I'm currently having the problem that I leverage the Airbnb dates in two different locations within my React project. The dates are styled differently. Therefore, I created 2 separate CSS files that overwrite the default styling. Even though, there…
jP_
  • 151
  • 1
  • 8
1
vote
1 answer

React-dates how to recognize in which way user choose data

How to recognize if User chose data by either pressing "Enter" button or by mouse click? Below is my code: false} isDayHighlighted={day => isSameDay(moment(new…
Andre Voks
  • 31
  • 4
1
vote
1 answer

React-Date "SingleDatePicker" not working as expected?

I am using react-dates and trying to implement singledatepicker. All the functionality is working but I dont know why all the default styles are gone. I am also using babel "transform-class-properties" import React from 'react'; import moment from…
Unity Hour
  • 550
  • 2
  • 7
  • 22
1
vote
1 answer

react-dates component doesn't allow selection of dates prior to current date

I am using airbnb's DateRangePicker. Its current behavior doesn't allow selection of dates prior to the present date. How do I change it to allow selection of past dates as start date? here is the code being used
Blank
  • 423
  • 1
  • 5
  • 16
1
vote
1 answer

How to pass an array of dates to react-dates component?

I'm using a DayPickerSingleDateController component. I'm keeping a set of to-be-highlighted dates in an array in the state. I don't find it clear in the docs how I can pass that array to the component as a prop (if possible). I would expect…
asliwinski
  • 1,662
  • 3
  • 21
  • 38
1
vote
2 answers

AirBnB React-dates not showing selected range

I'm trying to add AirBnB React-dates. All of functionality working except one thing (Not opening the month of already selected dates). When I'm assigning the start and end dates then it selects the range but not showing the selected month. It…
Janie
  • 638
  • 9
  • 26
1
vote
2 answers

react-dates SingleDatePicker in redux-form v5

I am trying to use SingleDatePicker in redux-form. Here is the render method in my form render() { const {fields: {date}, handleSubmit} = this.props; return (
iik
  • 73
  • 1
  • 9
0
votes
0 answers

How to select first or last date of range in react-dates DayPickerRangeController?

I would like users to be able to select the start date or end date of a range of dates defined by the 'isDayBlocked' prop - is this possible at all? The use-case being, using Airbnb for example, is June 7th to June 14th are blocked, a user should…
Ray Purchase
  • 681
  • 1
  • 11
  • 37
0
votes
0 answers

using react-dates date range picker how to allow only to select a start date and end date within 30days only from selected start date?

Here is code snippet: import React, { Component } from "react"; import moment from "moment"; import "react-dates/initialize"; import "react-dates/lib/css/_datepicker.css"; import { DateRangePicker } from "react-dates"; import { START_DATE, END_DATE…
0
votes
0 answers

React-dates DateRangePicker clear dates not working when you disable start or end date

I have been trying to use the react-dates DateRangePicker component in my code but when I disable either startDate/endDate, the clearDates functionality doesn't work. Can someone look into this and let me know what am i doing wrong here? below is…
Rahul Chauhan
  • 15
  • 2
  • 7
0
votes
0 answers

How to add attributes (for example cy-data) to dates in react-dates DayPickerSingleDateController

I'm writing a Cypress test, and want to test a few conditions on our react-dates DayPickerSingleDateController. I was thinking the clearest way would be to somehow add cy-data attributes to each date element so that I can then script the clicking of…
Matt B
  • 176
  • 1
  • 10
0
votes
1 answer

REACT SingleDatePicker calendar not opening

I am trying to add a drop down calendar but I get warning from the code below and there is not drop down calendar when cursor was placed over the input box. Warning from the developer tool, console panel: VM2542 react-dom.development.js:86 Warning:…
Hannah
  • 53
  • 1
  • 1
  • 6
0
votes
1 answer

react-dates/react-dates using day picker on mobile causes the keyboard to appear and disappear

When using react-dates in my app, I've found that on mobile when the user taps a date in the calendar popup it triggers the mobile keyboard to appear and immediately disappear. I've found that adding inputmode="none" to the inputs seems to fix the…
0
votes
3 answers

How to Disable Future Year, Month and Date in RN?

I know there a lots same questions, but none of them work as I need, about to disable future YYYY-MM-DD in React Native Date Picker: