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

updating the state for react-dates

I'm trying to use airbnb react-dates as follows: function NewEntryModal(props) { return { }} render={props => (
Student
  • 155
  • 1
  • 2
  • 10
0
votes
0 answers

react-dates triggers unexpected redux actions

I'm learning React and Redux. I got stuck with a connection of the react-dates component to the Redux. The main problem is that something (possibly react-dates) fires redux actions (SET_START_DATE, SET_END_DATE) at the start of an app, even though…
tawreon
  • 184
  • 12
0
votes
0 answers

Error when running tests with imported react-dates

I'm getting an error saying (function (exports, require, module, __filename, __dirname) { export const DISPLAY_FORMAT = 'L'; SyntaxError: Unexpected token export when I run my tests with this command: NODE_ENV=test mocha --compilers…
mrseanbaines
  • 823
  • 2
  • 12
  • 25
0
votes
2 answers

Access this.state values from child component

I am having trouble passing date values from a react-dates component to it's parent component. Firstly, I would normally handle such a task with Redux but it's overkill for the project and would prefer a simple solution. How can I pass onChange…
Darren
  • 2,176
  • 9
  • 42
  • 98
0
votes
1 answer

React-dates, when the user clicks on the input field corresponding to the end date, the month corresponding to the end date should be dispalyed

In the default case, when the user clicks on the input field corresponding to the end date, the calendar popup displays the starting month. For a use case where the user selects a large date range over many months, if he later wants to change only…
BRS
  • 45
  • 7
0
votes
0 answers

Using react-dates and setState isn't working

I am trying to implement a cancel feature, where if a user clicks outside the react-dates date picker calendar something happens. In my calendar component I am setting state for two properties - startDate and endDate but endDate doesn't get set on…
Heather Roberts
  • 1,978
  • 1
  • 24
  • 33
0
votes
1 answer

How can I get DateRangePicker to render calendars on click?

When I render this in webpack-dev-server, the calendar doesn't render on click. If I try to change the date manually, I get an error: DateSelection.js?f52c:25 Uncaught TypeError: Cannot read property 'calendarFocus' of null SingleDatePicker seems…
Andrew Horn
  • 2,291
  • 2
  • 16
  • 26
0
votes
3 answers

react-final-form - react-dates integration

I cannot integrate react-dates with react-final-form. If I add an onChange callback to react-dates' component, using change(name, value) function from the form, the name is not saved to the form state (I suppose because the field has to be…
avalla
  • 560
  • 4
  • 19
0
votes
0 answers

Is it possible to have two SDP(Single Date Pickers) in the same component using react-dates?

I want to use one SDP for the start date and the second for the end date, I'm using the following code. this.setState({ date })} // …
0
votes
0 answers

Module parsed failed using react-dates

I'm trying to implement airbnbs react-dates datepicker for my react-redux app. Error I'm receiving from webpack: ERROR in ./node_modules/react-dates/lib/css/_datepicker.css Module parse failed:…
cala
  • 767
  • 4
  • 11
  • 28
0
votes
1 answer

react-dates throwing warning message

I'm having trouble with this bit of code. I've done the following: import 'react-dates/lib/css/_datepicker.css'; import 'react-dates/initialize'; import { DateRangePicker } from "react-dates";
Strahinja Ajvaz
  • 2,521
  • 5
  • 23
  • 38
0
votes
2 answers

react-dates date differnce with momentjs

Hello i want to display the difference between 2 dates which i get from react-dates with momentjs. The dates are getting displayed, but the const Diff shows NaN. I have done everything according to the docs of momentjs…
0
votes
2 answers

airbnb/react-dates set blocked days after api fetch

Library: https://github.com/airbnb/react-dates Question: Is possible to set blocked days after fetch from server? (wait/recall isDayBlocked callback or re-initialize calendar) Problem: Callback 'isDayBlocked' is called after calendar changes view to…
0
votes
1 answer

React-Dates in component using Redux

As a newbie in React and Redux, i'm trying to use react-dates in a component. This is my code: import * as React from 'react'; import { connect } from 'react-redux'; import { ApplicationState } from '../store'; import * as DateState from…
JK87
  • 379
  • 2
  • 12
  • 26
-1
votes
0 answers

React-dates how can change style date picker range cells?

I have three problems how to implement the following things: When I use react-dates, I need to change the border style in cells, by default we have grey border and on hover the background too, but I want to change the border radius and background…
p1e0
  • 9
  • 3
1 2 3
10
11