Merged in feature/IO-3009-Clear-Dates (pull request #1872)
IO-3009 Clear Dates Approved-by: Dave Richer
This commit is contained in:
@@ -2,11 +2,11 @@ import { DatePicker } from "antd";
|
|||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import React, { useCallback, useState } from "react";
|
import React, { useCallback, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import dayjs from "../../utils/day";
|
import { connect } from "react-redux";
|
||||||
import { fuzzyMatchDate } from "./formats.js";
|
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors.js";
|
import { selectBodyshop } from "../../redux/user/user.selectors.js";
|
||||||
import { connect } from "react-redux";
|
import dayjs from "../../utils/day";
|
||||||
|
import { fuzzyMatchDate } from "./formats.js";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop
|
bodyshop: selectBodyshop
|
||||||
@@ -28,7 +28,6 @@ const DateTimePicker = ({
|
|||||||
|
|
||||||
const handleChange = useCallback(
|
const handleChange = useCallback(
|
||||||
(newDate) => {
|
(newDate) => {
|
||||||
if (!newDate) return;
|
|
||||||
if (onChange) {
|
if (onChange) {
|
||||||
onChange(bodyshop?.timezone ? dayjs(newDate).tz(bodyshop.timezone, true) : newDate);
|
onChange(bodyshop?.timezone ? dayjs(newDate).tz(bodyshop.timezone, true) : newDate);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user