Skip to content

Commit

Permalink
Merge pull request #32 from Endurance-Soft/fix-forms-data
Browse files Browse the repository at this point in the history
Fix forms data
  • Loading branch information
dotM87 authored May 31, 2024
2 parents 4379841 + 91404ef commit 9acaf92
Show file tree
Hide file tree
Showing 7 changed files with 304 additions and 218 deletions.
3 changes: 2 additions & 1 deletion src/components/DateInputField.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Controller } from 'react-hook-form';
import DateTimePicker from '@react-native-community/datetimepicker';
import { format, formatDate } from 'date-fns';

const DateInputField = ({ control, name, title, callThrough, type = 'default' }) => {
const DateInputField = ({ control, name, title, callThrough, type = 'default', isEditable }) => {

const [selectedDate, setSelectedDate] = useState(new Date());
const [showDatePicker, setShowDatePicker] = useState(false);
Expand Down Expand Up @@ -33,6 +33,7 @@ const DateInputField = ({ control, name, title, callThrough, type = 'default' })
onBlur={onBlur}
onChangeText={onChange}
value={format(selectedDate, 'dd/MM/yyyy')}
editable={isEditable}
/>

)}
Expand Down
Loading

0 comments on commit 9acaf92

Please sign in to comment.