Primeng: Text input readonly attribute

Created on 21 Jul 2017  路  3Comments  路  Source: primefaces/primeng

PrimeNG needs to support readonly attribute for inputs. It was already mentioned and closed as #117 stating that issue is too common. Requesting to add support for readonly attribute to Text input.

I'm submitting a ... (check one with "x")

[ ] bug report => Search github for a similar issue or PR before submitting
[x] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

What is the motivation / use case for changing the behavior?
There is behavioral and semantic difference between readonly and disabled

  • PrimeNG version: 4.1.1
  • Browser: all
  • Language: all

All 3 comments

Provide separate tickets per component please as this issue is too broad.

@cagataycivici, "Text input read only attribute" is too broad? Can you please provide an example of less broad issue? I think this relates only to text input component.

.ui-widget.read-only:disabled{
    opacity: 1;
    background-color: #dddddd;
}
                <input
                  type="text"
                  class="read-only"
                  disabled="disabled"
                  name="name"
                  [(ngModel)]="model.name" pInputText>
Was this page helpful?
0 / 5 - 0 ratings

Related issues

miresk picture miresk  路  3Comments

mitosandov picture mitosandov  路  3Comments

jisqaqov picture jisqaqov  路  3Comments

dhniels picture dhniels  路  3Comments

papiroca-tm picture papiroca-tm  路  3Comments