Skip to content

Commit

Permalink
adjust calendar open this icon (#193)
Browse files Browse the repository at this point in the history
* adjust calendar open this icon

* alter version
  • Loading branch information
gabrielRochaBuilders authored Nov 26, 2024
1 parent b1df4a9 commit e0ae3f9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@platformbuilders/fluid-react",
"version": "1.2.12",
"version": "1.2.13",
"private": false,
"description": "Builders React for Fluid Design System",
"keywords": [
Expand Down
1 change: 1 addition & 0 deletions src/components/DatePicker/DatePicker.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const meta: Meta<typeof DatePicker> = {
minDate: { control: { type: 'boolean' } },
maxDate: { control: { type: 'boolean' } },
inputVariant: { type: 'string' },
disabledInput: { control: { type: 'boolean' } },
},
args: {
onChange: onChange,
Expand Down
5 changes: 4 additions & 1 deletion src/components/DatePicker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ interface Props extends DatePickerProps {
workDays?: boolean;
holidays?: string[];
inputVariant?: 'default' | 'outlined';
disabledInput?: boolean;
}

const DatePickerComponent: React.FC<Props> = ({
Expand All @@ -30,6 +31,7 @@ const DatePickerComponent: React.FC<Props> = ({
name,
id,
inputVariant = 'outlined',
disabledInput = false,
}) => {
const datePickerRef = useRef();
return (
Expand All @@ -43,8 +45,9 @@ const DatePickerComponent: React.FC<Props> = ({
id={id}
value={value}
onClick={openCalendar}
onChange={(e) => onChange(e)}
onChange={(e) => (disabledInput ? value : onChange(e))}
iconRight="ChevronDownIcon"
onClickIconRight={openCalendar}
variant={inputVariant}
/>
);
Expand Down

0 comments on commit e0ae3f9

Please sign in to comment.