Questions tagged [react-datetime]

50 questions
1
vote
1 answer

React-Datetime; I'm using two in one component, how do I tell which is which?

This is an odd question about react-datetime: Why doesn't the callback allow a "name" to be returned? I'm using Daytime twice for "start" and "end" times on a calendar scheduler. But I want to use a single "onChange" event to update state. The…
Izzi
  • 2,184
  • 1
  • 16
  • 26
1
vote
1 answer

Setting state with the value of a react-dateTime component

please I need help. I'm using a react-dateTime component, and I am simply trying to get the value of that component just like every other field in a form. But I am unable to get the value of the selected date let alone store it in a state with the…
Martins
  • 110
  • 1
  • 9
1
vote
1 answer

react-datetime with typescript TS2769 error

I am using react-datetime with a react typescript project. I got TS2769 compile eror" TS2769: No overload matches this call. Overload 1 of 2, '(props: Readonly): ReactDatetimeClass', gave the following error. Type…
Jun Q
  • 415
  • 1
  • 4
  • 13
1
vote
1 answer

react-datetime timeConstraints for timePicker don't seem to work

I might be missing something here. react-datetime has a lot of functionality. Out of the box the time picker allows you to choose HH MM AM/PM with a picker. I want to get rid of AM/PM, make the hours 0-23, and I want to be able to choose seconds…
Andrew W.
  • 345
  • 6
  • 13
1
vote
0 answers

Mock moment functions in jest snapshot

I want to write a test for a react component using 'react-datetime' library. The component is using a lot of moment functions which I have to mock with jest one after another. I all the time get errors in the console while running test and keep…
heisenberg7584
  • 563
  • 2
  • 10
  • 30
1
vote
2 answers

How to enable manual range date time entering in react-datetime-range-picker?

What do i need to do enable manual date time entering? Because it's display as read only. but once set readOnly as false (input = {true}) it creates some errors import React, { Component } from "react"; import DatetimeRangePicker from…
Oshini
  • 613
  • 4
  • 17
1
vote
1 answer
1
vote
1 answer

React date pickers use older react versions

I am creating application which use a calendar and tried several react-date time pickers such as react-jqueryui-datepicker , react-date-picker-cs issue is those libraries use different old react versions and they give react older version errors, my…
Heshan
  • 772
  • 8
  • 22
1
vote
0 answers

Format value from react-datetime for input type="datetime-local"

I use react-datetime let date = component.props.data.value; return
Heidel
  • 3,174
  • 16
  • 52
  • 84
1
vote
2 answers

React Datepicker input state not changing?

I have a multi-step form with child form components. On one of the components, I'm trying to implement YouCanBookMe DatePicker. Now, when I try to update the state of datepicker's value like I do with other regular text inputs, the state does not…
Doge
  • 315
  • 1
  • 8
  • 26
1
vote
1 answer

react-datetime-YouCanBookMe error time and update state

I'using this library for react time picker: https://github.com/YouCanBookMe/react-datetime But now I have 2 problems. The time (Am, Pm, HH:mm) in timepicker doesnt'work , because it doesn't change, it remain to 12 : 00 AM How correctly update…
LorenzoBerti
  • 6,704
  • 8
  • 47
  • 89
0
votes
0 answers

styling reactdatePicker startMonth, endMonth and withinRange

Please I am working on a figma design that include different styling for startMonth, endMonth and withinRange. I am using reactdatepicker. here is the screenshot of what I want to implement. I use customrenderMonth but the styling does not change…
0
votes
1 answer

how to change the format of React DateTimePicker while displaying time on our webpage in react functional component

I am new to react could you please through this. Image of output of date and time If you see image I am getting output or is being displayed date and time as 2023-01-13T22:54:00.000Z. but I want to display the date and time in this format as 20…
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:
0
votes
0 answers

react-datetime validation for date in a format of MM/YYYY using formik & Yup

I'm using react-datetime with formik and Yup validations. Now the issue is when the user enters a invalid date in an invalid format then there is nothing to validate. I tried making the input field disabled or read-only when the users picks a date…
Mahijendra
  • 335
  • 5
  • 15