ng2-datetime
ng2-datetime copied to clipboard
Setting readonly option to false applies bootstrap's default disabled styling
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.
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'
Will be fixed with #100
The following worked on a Bootstrap 4 alpha 6 project to override the bootstrap style:
datetime .form-control[readonly="false"]{ background-color: #ffffff !important; }