Skip to content
This repository was archived by the owner on Nov 16, 2018. It is now read-only.
This repository was archived by the owner on Nov 16, 2018. It is now read-only.

add disabled option  #191

Open
Open

Description

@erdinc

Can we add attribute like disabled={true} ?

Activity

  1. marlon407 commented on Jul 25, 2016

    @marlon407

    +1

  2. relacsua commented on Dec 8, 2016

    @relacsua

    If you want to control the disabled state of this input, a simple manipulation of the DOM element using ref did the job for me.

    For example:

    <DateTimePicker
      ...
      ref={(dateRef) => {
      if (!disabled) {
        return;
      }
      const dateTimePicker = dateRef && dateRef.refs && dateRef.refs.datetimepicker;
      if (dateTimePicker) {
        for (const domElem of dateTimePicker.childNodes) {
          if (domElem.tagName === 'INPUT' &&  domElem.className === 'form-control') {
              domElem.disabled = true;
          }
        }
      }
    }}/>
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions