@@ -1,5 +1,5 @@
|
|||||||
import { DatePicker } from "antd";
|
import { DatePicker } from "antd";
|
||||||
import moment from "moment-timezone";
|
import moment from "moment";
|
||||||
import React, { useRef } from "react";
|
import React, { useRef } from "react";
|
||||||
//To be used as a form element only.
|
//To be used as a form element only.
|
||||||
|
|
||||||
@@ -29,16 +29,14 @@ export function FormDatePicker({
|
|||||||
|
|
||||||
const handleChange = (newDate) => {
|
const handleChange = (newDate) => {
|
||||||
if (value !== newDate && onChange) {
|
if (value !== newDate && onChange) {
|
||||||
console.log(newDate.tz(bodyshop.timezone));
|
onChange(newDate);
|
||||||
onChange(newDate.tz(bodyshop.timezone));
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleKeyDown = (e) => {
|
const handleKeyDown = (e) => {
|
||||||
if (e.key.toLowerCase() === "t") {
|
if (e.key.toLowerCase() === "t") {
|
||||||
if (onChange) {
|
if (onChange) {
|
||||||
console.log(moment().tz(bodyshop.timezone));
|
onChange(moment());
|
||||||
onChange(moment().tz(bodyshop.timezone));
|
|
||||||
// if (ref.current && ref.current.blur) ref.current.blur();
|
// if (ref.current && ref.current.blur) ref.current.blur();
|
||||||
}
|
}
|
||||||
} else if (e.key.toLowerCase() === "enter") {
|
} else if (e.key.toLowerCase() === "enter") {
|
||||||
|
|||||||
@@ -42,8 +42,6 @@ import axios from "axios";
|
|||||||
import { messaging } from "../../firebase/firebase.utils";
|
import { messaging } from "../../firebase/firebase.utils";
|
||||||
import { getToken } from "firebase/messaging";
|
import { getToken } from "firebase/messaging";
|
||||||
|
|
||||||
import moment from "moment-timezone";
|
|
||||||
|
|
||||||
export function* onEmailSignInStart() {
|
export function* onEmailSignInStart() {
|
||||||
yield takeLatest(UserActionTypes.EMAIL_SIGN_IN_START, signInWithEmail);
|
yield takeLatest(UserActionTypes.EMAIL_SIGN_IN_START, signInWithEmail);
|
||||||
}
|
}
|
||||||
@@ -271,7 +269,7 @@ export function* SetAuthLevelFromShopDetails({ payload }) {
|
|||||||
const userEmail = yield select((state) => state.user.currentUser.email);
|
const userEmail = yield select((state) => state.user.currentUser.email);
|
||||||
try {
|
try {
|
||||||
console.log("Setting shop timezone.");
|
console.log("Setting shop timezone.");
|
||||||
moment.tz.setDefault(payload.timezone);
|
// moment.tz.setDefault(payload.timezone);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user