Questions tagged [react-datetime]

50 questions
0
votes
1 answer

How to prevent the calendar from opening when react-datetime input is readOnly

I'm using react-datetime module in my form along with formik. import React, { useImperativeHandle, useReducer, forwardRef } from 'react'; import PropTypes from 'prop-types'; import { Form} from "react-bootstrap"; import…
SM1312
  • 516
  • 4
  • 13
0
votes
1 answer

react-datetime - Can't edit Date or Time

When clicked on the input box and type something valid, input will clear or some random date and time will assign to this input. It is allowing me to select date or time with mouse. Whenever type, input will clear or assign random values.
0
votes
1 answer

react-hook-form: How to get the date in format hh:mm:ss of UTC timezone from react-datetime in localtime zone

I have the following code import "./styles.css"; import { Col, Row, Form, InputGroup, Container } from "reactstrap"; import React from "react"; import { useForm, Controller } from "react-hook-form"; import…
Santhosh
  • 9,965
  • 20
  • 103
  • 243
0
votes
1 answer

Reactjs: How to create a time picker

I am using react-datetime for Datetime picker But now i am looking only for time picker Currently I use it as:
Santhosh
  • 9,965
  • 20
  • 103
  • 243
0
votes
1 answer

react-datetime: How to set the time to now() from a button

I am using react-datetime I want the user to easily set the time to current time using a button Immediate. Instead of selecting the current time manually. I am trying the below const [currentDateTime, setcurrentDateTime] =…
Santhosh
  • 9,965
  • 20
  • 103
  • 243
0
votes
2 answers

How to pass only the date to the database (without passing the time) using react-datetime picker

How to pass only the date to the database (without passing the time) using react-datetime picker. Currently in my code it will pass both date and time to the backend like this (2021-09-07T18:30:00.000Z). I want to pass only the date like…
0
votes
1 answer

How to close Calendar when press ENTER in keyboard input with react-datetime

I am using Datetime of "react-datetime" and would like to close the calendar when I press enter on the input. How to do this?
0
votes
1 answer

react-datetime hidden behind Accordion bootstrap

as you can see I have Accordion bootstrap, in one these card bodies I'm taking the datetime input using react-datetime but it got hidden behind other card header what can I do in its CSS to change this situation or what is the best package to get…
0
votes
1 answer

Get Specific Dates from Array of dates in React Datetime

Does anyone know how I can pass an array of dates to react-datetime? I'm trying to implement a datepicker which can display "booked" dates from my state but currently I only managed to disable all days before the current one. So how can I pass the…
networkcore
  • 135
  • 1
  • 11
0
votes
0 answers

React:I have to pick either date ranges over months or time ranges for single day

React: I have to select the date ranges or time range ON A SINGLE DAY Have date and time range but want to check either date range or time range for a single day. Which means if you select date range, have to disable to time selection where as if…
Shruti Patil
  • 31
  • 1
  • 1
  • 7
0
votes
1 answer

Dates manipulation with moment.js

I receive the following date from the server: "2018-11-21 07:00:00 UTC" Then, I convert it using userTimzone variable (since I wish the editor would use the user timezone): dateOfAction: moment(dateOfLoss, 'YYYY-MM-DD HH:mm…
Chen
  • 2,958
  • 5
  • 26
  • 45
0
votes
0 answers

when using react-datetime, redux-form and a custom input, the field doesn't update. Any idea why?

I am trying to render a custom input field, and not use the default one, as I need some extra elements surrounding my input This is my component, PetalkInvitationModal. The other 2 are examples of components that I'm trying to hack together for…
vlad-ardelean
  • 7,480
  • 15
  • 80
  • 124
0
votes
1 answer

ReactJS date picker issue with year only selection in Windows XP

We developed ReactJS app and used react-datetime for selecting date and Year. When selecting YEAR in client machine(Windows XP-Firefox 52.09), value(year) decreased by 1. Same thing happen if we use new Date(2018-01-01) converted to…
Satish
  • 391
  • 4
  • 22
0
votes
1 answer

Center align react-datetime inside modal

I'm building a modal that will allow user to select date and time. I'm using the react-datetime component. Here is my code:
Mendes
  • 17,489
  • 35
  • 150
  • 263
0
votes
1 answer

react datetime can't select time

Using react datetime out-of-the-box. It's rendering perfectly and passing data just fine. The problem is that while I am able to choose a date, the time input is not working properly. As you know it's an arrow up/down input for changing hour,…
208_man
  • 1,440
  • 3
  • 28
  • 59