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
0
votes
1 answer

Trouble manually entering date with AirBnB's DateRangePicker

I'm working on a bug in my company's code that uses AirBnB React Date's package, specifically the DateRangePicker component. If the user tries entering a date without two digits (such as 9/1/19 instead of 09/01/2019), MomentJS doesn't seem to pick…
Rohit
  • 3,018
  • 2
  • 29
  • 58
0
votes
1 answer

Multiple DateRangePicker in single component React

I have DatePicker defined like this:
Piotr M
  • 499
  • 3
  • 9
  • 27
0
votes
1 answer

Is it possible to Memoize an unkown number of Components with hooks?

I'm trying to avoid so many child component re-renders, but don't know how to optimize the code bellow: I have an object with a calendar looking shape like so: { 2019:{ 7:{ 1:{ avaliable: false …
0
votes
0 answers

How can I get Airbnb react-dates control to initially be closed?

I have the following code constructor(props) { super(props); this.state = { startDate: null, endDate: null, focusedInput: null }; } render() { return (
Mathias Rönnlund
  • 4,078
  • 7
  • 43
  • 96
0
votes
2 answers

My react-dates DateRangePicker is not working/rendering when clicked

I'm building a react redux expense tracking app and use moment.js and react-dates to set time and filter time range. However I am getting the error when I select anywhere, or the "x" to clear date, then nothing renders to screen. expenses.js:9…
Annie
  • 345
  • 2
  • 5
  • 18
0
votes
1 answer

How do I set state from a child component that requires a function to set state with react-dates?

I'm using react-date to try to set state of dates that are selected: this.setState({ startDate, endDate })} ... /> // PropTypes.func.isRequired This works fine if it is in…
0
votes
1 answer

React-dates select multiple weeks range

I'm currently using react-dates to have a DateRangePicker and I would like the user to be able to select multiple weeks at once. I've seen this way to select 7 days at once which is the start of what I want. I'd like the first click to select the…
a-coruble
  • 411
  • 4
  • 15
0
votes
3 answers

Is it possibile to use react-dates on a stateless component?

I'm setting a contact form with Gatsbyjs and need a datepicker. Is it possible to use react-dates on a stateless component? I tried but without success (since the instructions refers to a class component I don't really know how to behave here). This…
Santiago
  • 361
  • 4
  • 21
0
votes
1 answer

Vertical scroll in storybook is not accurate

I'm trying to implement this react-dates example, in storybook, on my…
Theo Itzaris
  • 4,321
  • 3
  • 37
  • 68
0
votes
0 answers

How to import css in react component in Meteor.js

I am trying to import 'react-dates' in react component. import 'react-dates/initialize'; import 'react-dates/lib/css/_datepicker.css'; import { DateRangePicker, SingleDatePicker, DayPickerRangeController } from 'react-dates'; But every time I am…
Suvojit Mondal
  • 107
  • 1
  • 2
  • 9
0
votes
1 answer

How to CSS styling with react-dates?

I'm using a react-dates package of Airbnb, but I can't styling CSS for it. So, if you used it, please help me. How to styling CSS for react-dates? "actual" I expect the date picker will be
NguyenDY
  • 67
  • 1
  • 1
  • 7
0
votes
1 answer

How to create a simple React Dropdown with Date range

I am new to React and I want to design a simple dropdown having options like : Last 30 days , Last 60 days , Last 6 months. Based on selection , I will render an specific array of object. Can someone guide me how I can design one, I tried looking at…
user9951102
  • 47
  • 1
  • 7
0
votes
1 answer

How to internationalize React-Dates Month and weekday names?

I'm working with react-dates and I'm trying to figure out how to internationalize the month and weekday names. I already figured out how to do this to the input placeholder text but I can't find how to do this. the current props that I give to…
user9988919
0
votes
1 answer

React-dates initialMonth based on available dates

I have date-picker component (DayPickerSingleDateController). There is " isoutsiderange property (available only +4 (from to day) days. ) But because of this an error occurs. Event if current month don't have available dates it still shows…
Stefan B
  • 219
  • 1
  • 12
0
votes
1 answer

Setting the default startDate and endDate properties for react-dates

Setting default values for startDate and endDate for the react-dates component breaks the component with the error below: My react version: "react": "^16.5.2" "react-dates": "^18.1.0" Component code: import React from 'react' import…
thanikkal
  • 3,326
  • 3
  • 27
  • 45