#13107 closed bug (notabug)
Editable DatePicker for readonly fields
Reported by: | serhio | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.datepicker | Version: | 1.8.6 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I have a
<input type="text" value="@today" size="10" maxlength="10" readonly class="datepicker">
So as you can see the input is readonly
then
$(".datepicker").datepicker()
however is possible to modify the value via the GUI when clicking on the control and selecting a new value...
Change History (5)
comment:1 Changed 8 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
comment:2 Changed 8 years ago by
As I understand the meaning of readonly, that should mean just it means: READ ONLY.
What kind of readonly control is it, if the final user can set a random value by picking a random date from the datepicker??
comment:3 Changed 8 years ago by
Why are you attaching an editable datepicker to a readonly field if you don't want the user to enter a date? This isn't going to change. This is a fairly common use case.
comment:4 Changed 8 years ago by
If I don't enable the datapicker, I am not able to send data via a POST request.
I need to send data of a value of datepicker, but not allow users to modify its value.
A DISABLED datepicker does not send any data to POST requests ((
This is why in HTML(CSS) there are :disabled and :read-only selectors that are supposed to be different things...
comment:5 Changed 8 years ago by
why just do not made a readonly datepicker be really readonly?
Is simple. If there where a property "not-able-to-manipulate-in-the-textbox-the-text-value", is ok, but "readonly" should mean "readonly"...
That's as intended. The datepicker is an editable control. Making the input readonly just means that the user cannot manually type a value into it.