IO-2834 Placeholder Translations
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
import { DatePicker } from "antd";
|
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 dayjs from "../../utils/day";
|
import dayjs from "../../utils/day";
|
||||||
import { dateFormats, dateTimeFormats } from "./formats.js";
|
import { dateFormats, dateTimeFormats } from "./formats.js";
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
|
|
||||||
const DateTimePicker = ({ value, onChange, onBlur, id, onlyFuture, onlyToday, isDateOnly = false, ...restProps }) => {
|
const DateTimePicker = ({ value, onChange, onBlur, id, onlyFuture, onlyToday, isDateOnly = false, ...restProps }) => {
|
||||||
const [isManualInput, setIsManualInput] = useState(false);
|
const [isManualInput, setIsManualInput] = useState(false);
|
||||||
@@ -132,8 +132,7 @@ const DateTimePicker = ({ value, onChange, onBlur, id, onlyFuture, onlyToday, is
|
|||||||
format={isDateOnly ? "MM/DD/YYYY" : "MM/DD/YYYY hh:mm a"}
|
format={isDateOnly ? "MM/DD/YYYY" : "MM/DD/YYYY hh:mm a"}
|
||||||
value={value ? dayjs(value) : null}
|
value={value ? dayjs(value) : null}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
// TODO - Add placeholder translation
|
placeholder={isDateOnly ? t("general.labels.date") : t("general.labels.datetime")}
|
||||||
placeholder={isDateOnly ? t("date") : t("dateAndTime")}
|
|
||||||
onBlur={onBlur || handleBlur}
|
onBlur={onBlur || handleBlur}
|
||||||
disabledDate={handleDisabledDate}
|
disabledDate={handleDisabledDate}
|
||||||
{...restProps}
|
{...restProps}
|
||||||
|
|||||||
@@ -1188,6 +1188,8 @@
|
|||||||
"clear": "Clear",
|
"clear": "Clear",
|
||||||
"confirmpassword": "Confirm Password",
|
"confirmpassword": "Confirm Password",
|
||||||
"created_at": "Created At",
|
"created_at": "Created At",
|
||||||
|
"date": "Select Date",
|
||||||
|
"datetime": "Select Date & Time",
|
||||||
"email": "Email",
|
"email": "Email",
|
||||||
"errors": "Errors",
|
"errors": "Errors",
|
||||||
"excel": "Excel",
|
"excel": "Excel",
|
||||||
@@ -2736,7 +2738,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"production": {
|
"production": {
|
||||||
"constants":{
|
"constants": {
|
||||||
"main_profile": "Default"
|
"main_profile": "Default"
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1188,6 +1188,8 @@
|
|||||||
"clear": "",
|
"clear": "",
|
||||||
"confirmpassword": "",
|
"confirmpassword": "",
|
||||||
"created_at": "",
|
"created_at": "",
|
||||||
|
"date": "",
|
||||||
|
"datetime": "",
|
||||||
"email": "",
|
"email": "",
|
||||||
"errors": "",
|
"errors": "",
|
||||||
"excel": "",
|
"excel": "",
|
||||||
@@ -2736,7 +2738,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"production": {
|
"production": {
|
||||||
"constants":{
|
"constants": {
|
||||||
"main_profile": ""
|
"main_profile": ""
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
|
|||||||
Reference in New Issue
Block a user