Questions tagged [react-day-picker]

react-day-picker is a flexible date picker component for React

Read the react-day-picker documentation and check out the examples to learn how to implement it.

129 questions
0
votes
0 answers

Limit range if some date in range is disabled

I have a daypicker with mode=range and disabled dates. If I want to select a range that has a disabled day in it, it is selected correctly and it is not what I expect. I want to avoid that, maybe reducing the range a day before disabled. Is this…
Agustin G.
  • 72
  • 3
  • 19
0
votes
1 answer

React Date-picker Selecting a Range of days not working

I would like to show a specific range of selected Dates from React Date-Picker. I have tried with their documentation site demo code. but this code is not working .what will be the solution? Below is my sample code, ` import React, { useState } from…
Aknath
  • 3
  • 2
0
votes
0 answers

Is there a way to implement month picker in React day picker?

I have two conditions, One is to select the whole week, select any date, it will automatically select all the days of the week I think this condition has a good chance of being fulfilled One is to select a month. After successful selection, all…
0
votes
1 answer

React DayPicker Infinite loop or no value

The app matches an array of birthdays with the current day. I want to extend it with a date picker, so that it would not only display the birthdays of the day but the birthdays for any date picked. The results for the console.log are the values I…
0
votes
1 answer

React Day Picker months and weekdays_long

I am using "react": "^18.2.0", "react-day-picker": "^8.1.0", and I am trying to change the months and days name in French, but when I pass my arrays to my component , nothing changes. When I log my arrays, I can see it good. All the…
solene
  • 21
  • 4
0
votes
1 answer

How to get the date between the from date and to date?

I'm working on DayPicker to get all the range dates, but I couldn't have any good idea of knowing the dates between the start date and end date. import { DateRange, DayPicker } from 'react-day-picker' const [range, setRange] = useState
Shun Yamada
  • 879
  • 1
  • 10
  • 25
0
votes
1 answer

Getting array of dates for a specific week with React DayPicker

I would like to be able to click a specific week number in the react DayPicker and have an array of all dates contained in that week returned to me. I am using this DayPicker package: https://react-day-picker.js.org/ I have copied the example code…
0
votes
1 answer

React-day-picker show previous month when using numberOfMonths

I'm using the react-day-picker component and the numberOfMonths variable to set the month's display. The current display shows the current month and next month, but I'm trying to show the previous month and the current month. Current…
Hazel
  • 85
  • 7
0
votes
1 answer

Module not found: Can't resolve 'react-day-picker/dist/style.css'

this is mistake In in path check node_mdoule there is path of style.css in the /lib folder not in /dist so import like this Before ..... import 'react-day-picker/dist/style.css' this is wrong
Jagtar Singh
  • 171
  • 4
0
votes
2 answers

React day picker gives an error when double click on data

index.js:373 Uncaught RangeError: Invalid time value at format (index.js:373:1) at AvailableAppointment (AvailableAppointment.js:16:1) at renderWithHooks (react-dom.development.js:16175:1) at updateFunctionComponent…
0
votes
0 answers

Javascript Add two days to current date exclude holidays and weekends using date-fns library

Suppose today is my current date I want to add two business days and if the holidays/weekends fall into these days , we append those many holidays and skip the weekends. 11/05/2022 + 2 days = 13/05/2022, if any holidays fall in between these days we…
0
votes
1 answer

Prevent selection of same dates react-day-picker

I'm using react-day-picker and I when startDate is selected I want to prevent selection of same date. how is that possible? I tried incrementing startDate by 1 and set It as disabledDays before property but It messed up selection. so which is proper…
0
votes
1 answer

How to use tailwind with react-day-picker?

I am currently trying to style the DayPickerInput with Tailwind and it does not work. I have read the documentation and it doesn't seem to be integrated so what can be a good approach for this? The current workaround, which i believe is not a good…
laxepi4621
  • 23
  • 5
0
votes
1 answer

How to change background color of react-day-picker?

I would like to change the background color of the day picker but I can't seem to find a way. Here is my code: .DayPicker-wraper { background-color: black; }
kid
  • 771
  • 1
  • 4
  • 12
0
votes
1 answer

How to specify handleDayClick of React Day Picker component of a functional component

I have a functional component where I am using the react-day-picker component. On the examples page, they use a class-based component and provide this example on how to handle day selection: ... handleDayClick(day, { selected }) { } ... …
1 2 3
8 9