import moment from 'moment';

export default {
    parse: (props, format = 'YYYY-MM-DD') => {
        if (props.defaultValue !== undefined) {
            props.defaultValue = moment(props.defaultValue, format);
        }
        if (props.value !== undefined) {
            props.value = moment(props.value, format);
        }
        if (props.defaultPickerValue !== undefined) {
            props.defaultPickerValue = moment(props.defaultPickerValue, format);
        }
    }
}