-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to change "Pick a date" title in iOS? #389
Comments
@VivekVithlani that should work, are you on the latest version of the picker? |
@mmazzarolo Yes, I am using the latest version Can you please put some example code? |
import React, { useState } from "react";
import { Button, View } from "react-native";
import DateTimePickerModal from "react-native-modal-datetime-picker";
const Example = () => {
const [isDatePickerVisible, setDatePickerVisibility] = useState(false);
const showDatePicker = () => {
setDatePickerVisibility(true);
};
const hideDatePicker = () => {
setDatePickerVisibility(false);
};
const handleConfirm = date => {
console.warn("A date has been picked: ", date);
hideDatePicker();
};
return (
<View>
<Button title="Show Date Picker" onPress={showDatePicker} />
<DateTimePickerModal
headerTextIOS="Estimated Start Date"
isVisible={isDatePickerVisible}
mode="date"
onConfirm={handleConfirm}
onCancel={hideDatePicker}
/>
</View>
);
};
export default Example; |
I could not make it work either. |
This property is gone - what's the recommended way to set the header now? |
@achuinard you should use the |
@mmazzarolo Thanks for the recommendation! |
Ask your Question
How to change "Pick a date" title in iOS?
I try with below code
headerTextIOS={'Estimated Start Date'}
The text was updated successfully, but these errors were encountered: