Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React, {PureComponent} from "react";
import {Text, TouchableHighlight, View} from "react-native";
import PropTypes from "subschema-prop-types";
import DatePicker from "react-native-modal-datetime-picker";
import {styleClass} from "../PropTypes";
import moment from "moment";
const {onConfirm, onCancel, ...propTypes} = DatePicker.propTypes;
export default class DateInputType extends PureComponent {
static displayName = 'Date';
static propTypes = {
...propTypes,
onChange: PropTypes.valueEvent,
containerStyle: styleClass,
mode: PropTypes.oneOf(["date", "datetime", "time"])
};
static defaultProps = {
...DatePicker.defaultProps,
mode: 'date',
setDateText: "Set Date",
cancelTextIOS: "Cancel",