Skip to content

Commit

Permalink
input date some more ability
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafee1100 committed May 11, 2024
1 parent 5cc4d8e commit e900aab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gns-design-system",
"version": "1.0.35",
"version": "1.0.36",
"source": "src/index.js",
"files": [
"dist",
Expand Down
7 changes: 5 additions & 2 deletions src/components/Forms/ImsFormElements/ImsInputDate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const ImsInputDate = ({
mandatory = false,
disabled,
helperText,
viewMode="days",
dateFormat="D/M/YYYY"
}) => {
return (
<FormGroup row>
Expand Down Expand Up @@ -38,13 +40,14 @@ const ImsInputDate = ({
// this onchange is for calender ...
onChange={(e) => {
if (typeof e === "object") {
let currentTarget = { name, value: e.format("D/M/YYYY") };
let currentTarget = { name, value: e.format(dateFormat) };
onChange({ currentTarget });
}
}}
timeFormat={false}
dateFormat={"D/M/YYYY"}
dateFormat={dateFormat}
closeOnSelect
viewMode={viewMode}
/>

{error && (
Expand Down

0 comments on commit e900aab

Please sign in to comment.