Added QB like calculator field for numbers that can be used. Resolved issue for unsaved changes indicator BOD-245 BOD-220

This commit is contained in:
Patrick Fic
2020-08-03 15:50:55 -07:00
parent 8e681a806c
commit a722120351
12 changed files with 137 additions and 23 deletions

View File

@@ -8,16 +8,16 @@ import { useTranslation } from "react-i18next";
const DateTimePicker = ({ value, onChange, onBlur }, ref) => {
const { t } = useTranslation();
const handleChange = (value) => {
if (onChange) {
onChange(value);
const handleChange = (newDate) => {
if (value !== newDate && onChange) {
onChange(newDate);
}
};
return (
<DatePicker
className='ant-picker ant-picker-input'
data-lpignore='true'
className="ant-picker ant-picker-input"
data-lpignore="true"
selected={value ? new Date(value) : null}
onChange={handleChange}
showTimeSelect
@@ -25,7 +25,7 @@ const DateTimePicker = ({ value, onChange, onBlur }, ref) => {
onBlur={onBlur}
isClearable
placeholderText={t("general.labels.selectdate")}
dateFormat='MMMM d, yyyy h:mm aa'
dateFormat="MMMM d, yyyy h:mm aa"
/>
);
};