ng2-datetime icon indicating copy to clipboard operation
ng2-datetime copied to clipboard

Setting readonly option to false applies bootstrap's default disabled styling

Open jaggedaz opened this issue 8 years ago • 3 comments

This is sort of related to #103 because I want to be able to change the readonly state using a binding expression. What I noticed is that if readonly is set to false, bootstrap's default styling will give the input a gray background indicating that the control is disabled. Perhaps the input's readonly attribute could be removed entirely rather than set to false when the datetime component's readonly option is set to false. This would remove the disabled styling from the input when toggling the readonly state via binding.

jaggedaz avatar Dec 22 '16 21:12 jaggedaz

I think you can override the default css property by doing something like this

datetime>input[readonly]{ border: 1px solid #ccc !important; background-color: #fcfcfc !important; cursor: not-allowed !important;
}

don't forget to add 'important'

ghost avatar Dec 27 '16 08:12 ghost

Will be fixed with #100

nkalinov avatar Jan 04 '17 08:01 nkalinov

The following worked on a Bootstrap 4 alpha 6 project to override the bootstrap style:

datetime .form-control[readonly="false"]{ background-color: #ffffff !important; }

htrex avatar May 21 '17 17:05 htrex