Questions tagged [react-native-datetimepicker]
16 questions
3
votes
2 answers
Allowing Null Value for React-Native-DateTimePicker
I have a React Native application with a form for entering data. One of the fields is a DateTime value, but is optional. In other words, the user can choose a date if they want one, but can leave it blank/null if the field is not relevant.
However,…

David Schwartz
- 162
- 1
- 10
3
votes
0 answers
React Native DateTimePicker Styling
I am having issues styling React Native DateTimePicker. The relevant code is as follows:
import React, { ReactChild, useState } from 'react';
import DateTimePicker from '@react-native-community/datetimepicker';
const Picker = () => {
const…

lil_dippa
- 147
- 1
- 11
3
votes
3 answers
Programmatically open/close react-native-datetimepicker?
Is there a way to programmatically open/close the date picker from react-native-datetimepicker?
My use case is creating a component based on TouchableOpacity that opens the DatePicker when pressed (with a much bigger surface area than the tiny date…

Bertrand Caron
- 2,525
- 2
- 22
- 49
2
votes
2 answers
react-native-modal-datetime-picker showing only current date
I'm using react-native-modal-datetime-picker in my React Native app on iOS, and when the modal pops up, instead of having a range of dates to scroll through, it shows only the current date:

gkeenley
- 6,088
- 8
- 54
- 129
1
vote
0 answers
Date Picker not Visible in React Native Date Time Picker Modal
I am using react native date time picker modal to pick dates in my react native application. It was working fine but suddenly the date picker is not visible any more, only the confirm and cancel buttons are visible and the dates themselves are not…

Adam Saleem
- 83
- 9
1
vote
1 answer
How to display the calendar using modal datetime picker
I am using the react-native-modal-datetime-picker library and I am trying to use the display prop to display the calendar. If you look at my reproducible example found on snack expo here, you can see the issue I am having. I have also posted the…

MouseWarrior
- 391
- 4
- 19
1
vote
0 answers
modify styles of date picker modal
I'm using react-native-date-picker and I want to change its buttons color (CANCEL/CONFIRM), there are no props options to do that, is there any other way I can change the color of the these buttons and the title of the modal (Select date)

Saadi
- 121
- 1
- 8
1
vote
2 answers
How To Use Two React Native date Picker modal in same component
I want two dates one is start date and other is end date but now the problem is when I change Start Date Automatically end date is also changing and same vice versa. I am using this = 'react-native-date-picker';
here is my code
import DatePicker…
user14877357
1
vote
1 answer
react native DateTimePicker set initial state to String
I'm trying to implement react-native-datetimepicker and i want to set an initial state text "Edit Date of Birth" instead of current today Date, can anyone guide me on how to achieve that? It seems that i can't use a string as a value in the date…

Tony
- 364
- 1
- 4
- 14
1
vote
1 answer
How to get the value of date from @react-native-community/datetimepicker and store it in for a user in an object
I am building a signup page for users where they can select their date of birth from the datepicker which I used from '@react-native-community/datetimepicker'. Everything is working fine and the code is able to display the selected date on the…

Rahul Thakur
- 25
- 1
- 8
0
votes
1 answer
How do I get the value of datetime picker in react native?
I am getting an object and I have no idea how to get the date from the datetime picker, this is my code basically:
import DateTimePicker from '@react-native-community/datetimepicker';
const [date,setDate] = React.useState(new Date())
const [today]…

Adrian
- 71
- 5
0
votes
0 answers
Changing date using react-native-date-picker on android using detox
I am having troubles with changing date on Android, on iOS its easy since there is inbuild function in detox for it.
async setDateOnAgeGate(date, dateformat, year, month, day){
if (device.getPlatform() === 'android') {
await…
0
votes
1 answer
how can i display the selected time from a timepicker in a textinput react native
I used this timepicker my objective is to select a time from the picker and display it in my text inputs everything is working fine up until I select the time it won't show and gives me an error that text input value has to be a string can anyone…

samer g
- 129
- 9
0
votes
3 answers
TypeError: props.date.getTime is not a function. (In 'props.date.getTime()', 'props.date.getTime' is undefined)
I'm using react-native-date-picker to show the date picker. Here is how I'm doing it:
...
const [userUserDOB, setUserDOB] = useState(new Date());
...

Chaudhry Talha
- 7,231
- 11
- 67
- 116
-1
votes
2 answers
Custom spinner picker date time with day but not have time
I have trouble with date time picker with mode datetime, currently i use @react-native-community/datetimepicker lib for showing spinner but in iOS i need remove time, only with current day (today, monday, tuesday, ... ) then date.
Anyone has suggest…

Minh Vo
- 120
- 6