Skip to content

Commit

Permalink
Fix(datepicker): Prevent input error styling from applying to datepic…
Browse files Browse the repository at this point in the history
…ker select (#3119)
  • Loading branch information
Ayesha Mazumdar committed Mar 7, 2018
1 parent 741c2a4 commit 0fa0165
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ui/components/datepickers/base/_index.scss
Expand Up @@ -119,6 +119,11 @@
}
}

.slds-has-error .slds-datepicker__filter .slds-select {
border: $border-width-thin solid $color-border-input;
box-shadow: none;
}

/**
* @summary Indicates days that are in previous/next months
*
Expand Down
21 changes: 21 additions & 0 deletions ui/components/datepickers/base/example.jsx
Expand Up @@ -428,5 +428,26 @@ export let states = [
/>
</FormElement>
)
},
{
id: 'datepicker-with-error',
label: 'Date Picker has Error',
element: (
<FormElement
className="slds-dropdown-trigger slds-dropdown-trigger_click slds-is-open slds-has-error"
label="Date"
inputId={dateInputId}
inputIcon="right"
dropdown={<DatePicker todayActive />}
>
<Input id={dateInputId} placeholder=" " />
<ButtonIcon
className="slds-input__icon slds-input__icon_right"
symbol="event"
assistiveText="Select a date"
title="Select a date"
/>
</FormElement>
)
}
];

0 comments on commit 0fa0165

Please sign in to comment.