ordering-ui-react-native 0.28.43-test → 0.30.43-test

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.28.43-test",
3
+ "version": "0.30.43-test",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -38,7 +38,7 @@
38
38
  "@react-native-async-storage/async-storage": "^1.15.5",
39
39
  "@react-native-clipboard/clipboard": "^1.8.4",
40
40
  "@react-native-community/checkbox": "^0.5.8",
41
- "@react-native-community/datetimepicker": "^7.1.0",
41
+ "react-native-datetime-picker": "^7.1.0",
42
42
  "@react-native-community/geolocation": "^2.0.2",
43
43
  "@react-native-community/masked-view": "^0.1.10",
44
44
  "@react-native-community/netinfo": "^6.0.2",
@@ -83,7 +83,7 @@ export const UserFormDetailsUI = (props: any) => {
83
83
  const [isValid, setIsValid] = useState(false)
84
84
  const [isChanged, setIsChanged] = useState(false)
85
85
  const [isModalOpen, setIsModalOpen] = useState(false)
86
- const [birthdate, setBirthdate] = useState(user?.birthdate ?? '')
86
+ const [birthdate, setBirthdate] = useState(user?.birthdate ?? null)
87
87
  const [phoneInputData, setPhoneInputData] = useState({
88
88
  error: '',
89
89
  phone: {
@@ -393,14 +393,14 @@ export const UserFormDetailsUI = (props: any) => {
393
393
  borderColor={theme.colors.primary}
394
394
  isDisabled={formState.loading}
395
395
  imgRightSrc={null}
396
- style={{ borderRadius: 7.6, shadowOpacity: 0, width: '100%', borderWidth: 1, marginTop: 20, marginBottom: 20 }}
396
+ style={{ borderRadius: 7.6, shadowOpacity: 0, borderWidth: 1, marginTop: 20, marginBottom: 20 }}
397
397
  onClick={() => setDatePickerVisibility(true)}
398
398
  />
399
399
  <DateContainer>
400
400
  <DateTimePickerModal
401
401
  isVisible={isDatePickerVisible}
402
402
  mode="date"
403
- date={birthdate ?? new Date()}
403
+ date={birthdate ? new Date(birthdate) : new Date()}
404
404
  onConfirm={_handleChangeDate}
405
405
  onCancel={() => setDatePickerVisibility(false)}
406
406
  />