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

onClose, react-date-presets returns undefined startDate, endDate, when pick a range. OK if select custom-range

If i select a custom range, the onClose correctly return startDate and endDate but if i pick one value from the ranges it will break since returns undefined. I have to find a way to grab the updated startDate and endDate inside the onClose function…
Matteobikk90
  • 185
  • 1
  • 14
0
votes
1 answer

DataCloneError: Failed to execute 'pushState' on 'History'

I am new to Reactjs. I wanted to input date-range from user and pass it to second page(search) but I got the error(DataCloneError: Failed to execute 'pushState' on 'History'.) when I pass states endDate and startDate.It works fine when I pass any…
0
votes
0 answers

What is this file? =#.##

I'm adding react-dates ( https://github.com/airbnb/react-dates ) to my NextJS project and I noticed this file. File Name: =#.## Contents: + moment@2.29.1 + react-dates@21.8.0 + react-dom@16.14.0 + react@16.14.0 updated 4 packages and audited 389…
0
votes
1 answer

How do i change in javascript date format like this-Mon Jun 07 2021 17:44:06 GMT+0300 (שעון ישראל (קיץ)) to 2021-06-07( in this order year/month/day)

I have been trying to make somthing like this const dateFormated = startDate.toLocaleDateString().split(".").join("-"); but it isn't in the right order and its missing numbers like instead being 06 its 6
0
votes
1 answer

airbnb/react-dates DayPickerRangeController set visible month on some function call

Is there way to set DayPickerRangeController custom visible month after component rendered? I have 'handleMonthChange' function which I want to change visible month when this function is called. I try to set 'initialVisible' month but it is not…
Aliaga Aliyev
  • 415
  • 1
  • 6
  • 22
0
votes
1 answer

Getting TypeError : `month` must be a valid moment object in mobile Airbnb/react-dates

I am using react-dates DayPickerRangeController for desktop and mobile but in mobile I am getting this error - TypeError : month must be a valid moment object Below is my code - /* eslint-disable @typescript-eslint/no-explicit-any */ import React, {…
0
votes
2 answers

date.format is not a function reacr-dates

I was trying to use singleDatePicer from react-dates,which is a popular date picker library by airbnb, on selecting a date, it throws the error date.format is not a function, and just breaks, my code sandbox link is -> https://08cg1.csb.app/. Thanks…
Aashiq
  • 447
  • 1
  • 12
  • 27
0
votes
1 answer

How to use react-dates with redux-form

I am working on react-dates with redux-form. Logic is already implemented but when I checked the console for it values it showing nothing . I've already tried but could not able to resolve this issue. Could someone please help me how to resolve this…
Brad
  • 1
0
votes
1 answer

SingleDatePicker focused (react-dates) => returning an error

The SingleDatePicker from react-dates returning an error: Invalid prop focused of type object supplied to withStyles(SingleDatePicker), expected boolean Here the link: https://codesandbox.io/s/dazzling-mclaren-2w5q8?file=/src/App.js
Matteobikk90
  • 185
  • 1
  • 14
0
votes
1 answer

react-dates Cannot read property 'clone' of null at new DayPicker

I have below code const [focusedInput, setFocusedInput] = useState('startDate'); const onFocusChange = fInput => { setFocusedInput(!fInput ? 'startDate' : fInput); };
Md. Parvez Alam
  • 4,326
  • 5
  • 48
  • 108
0
votes
1 answer

add raduis in selected dates for react-dates (airBnB)

I'm using react-dates in order to achieve the following date range picker : here is what I have done : https://codesandbox.io/s/ecstatic-almeida-3u72o?fontsize=14&hidenavigation=1&theme=dark but I still have a problem to apply the selected style…
Taha LAGHZALI
  • 464
  • 2
  • 14
0
votes
2 answers

SingleDatePicker by react-dates is not closing on change

Hey I have set up a react dates functionality on my app, however the date, when chosen doesnt make the calendar close. I have the example here on https://codesandbox.io/s/magical-dubinsky-xuxkj?file=/src/App.js:0-681 import React, { useState } from…
Eddsters
  • 458
  • 1
  • 4
  • 16
0
votes
1 answer

keep react-dates calendar always open

So this is my dateRangePicker code : I actually see this code like a solution somewhere else ..but not working for me. So this react-date component will be add to a dropdown as a label. and when you click on the label, it will automaticaly open the…
pion-dev
  • 21
  • 3
0
votes
1 answer

Warning: Invalid prop `reopenPickerOnClearDates` of type `function` supplied to `DateRangePicker`, expected `boolean`

I'm using react 16.13.1 and react-dates 21.8.0. I'm facing a problem with DateRangePicker component(SingleDatePicker works just fine) i use it as follow :
mhannani
  • 492
  • 1
  • 5
  • 18
0
votes
1 answer

Profile pictures in react dates calendar

Hi all Can I have image in particular days in react-dates calendar as in attached picture?