fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

Datepicker icon clickable when disabled=true

Open haifoo opened this issue 8 years ago • 4 comments

Bug Report

  • Package version(s): ^4.51.1
  • Browser and OS versions: Chrome 63, IE 11, IE 10

Describe the issue:

Datepicker icon clickable when disabled=true

Actual behavior:

setting disabled prop to true does not disable the calendar icon. when clicked, datepicker pop-up shows. picking a date in the pop-up updates the text input field

Expected behavior:

icon is disabled/not clickable together with input textbox

haifoo avatar Dec 20 '17 17:12 haifoo

I was unable to repro this. The disabled prop works as expected for me. Could you post a Codepen or sample code how you're using it? Thanks

erichdev avatar Dec 20 '17 18:12 erichdev

I am using the component in an Office365 page. Initially thought it was because it was messing up with the Office365 core styling/classes, but it has the same behavior with the standard app via create-react-app running on local. I just used the sample code given in the Fabric UI site.

haifoo avatar Dec 22 '17 16:12 haifoo

basically wrapped the sample code in the Fabric UI site in a component, and called the DatePicker with the following:

<DatePicker label="Start date" isRequired={false} allowTextInput={true} ariaLabel={desc} firstDayOfWeek={firstDayOfWeek} strings={DayPickerStrings} value={value} onSelectDate={date => this.setState({value: date})} disabled={true} />

haifoo avatar Dec 22 '17 16:12 haifoo

Ah there's a bug where it opens if a label is included. I'll submit a PR shortly

erichdev avatar Dec 22 '17 22:12 erichdev