import moment from "moment";

import { dateFormats } from "shared/model/consts";
import { EDateFormat } from "shared/model/enums";

export function datePickerProps(value: string) {
	return {
		format: EDateFormat.ui,
		value: value ? moment(value, dateFormats) : null,
	};
}
