Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DatePicker disabled dates do not show as 'disabled' #5210

Closed
cknabe opened this issue Jan 29, 2020 · 2 comments
Closed

DatePicker disabled dates do not show as 'disabled' #5210

cknabe opened this issue Jan 29, 2020 · 2 comments

Comments

@cknabe
Copy link
Contributor

cknabe commented Jan 29, 2020

carbon-components-react

On supplying a minDate and maxDate, the DatePicker properly keeps you from selecting outside the range. However, you cannot visually tell what is enabled/disabled.

In the below picture you should not see any date before the 29th as selectable.
image

A disabled class used to be applied to the disabled dates( .bx--date-picker__day.disabled, .flatpickr-day.disabled).
e.g.
image

Example usage:

import {
  Checkbox,
  DatePicker,
  DatePickerInput,
  Select,
  SelectItem,
  SkeletonText,
  Tooltip,
} from '@console/pal/carbon-components-react';
      <DatePicker
        className={'time-component'}
        dateFormat={dateFormat}
        datePickerType="single"
        disabled={isImmediate}
        id="date-picker"
        key="date-picker"
        light={true}
        locale={locale}
        minDate={minDate}
        maxDate={maxDate}
        onChange={this.setSelectedDate}
      >
        <DatePickerInput
          defaultValue={selectedDateUtc}
          disabled={isImmediate}
          iconDescription={t('MaintenanceWindow.datePickerLabel')}
          id="maintenance-window-date-picker-input"
          labelText={t('MaintenanceWindow.datePickerLabel')}
          placeholder={placeholder}
        />
      </DatePicker>

Possibly the light={true} is messing with it somehow?

@tw15egan
Copy link
Contributor

This should be resolved with #5085 when 10.9.3 is released. Going to close this, but feel free to reopen if you don't see the fix when the update is released.

@cknabe
Copy link
Contributor Author

cknabe commented Feb 3, 2020

This has been resolved for me
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants