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:
@@ -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"
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user