Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#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 Scott González

Resolution: notabug
Status: newclosed

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.

comment:2 Changed 8 years ago by serhio

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??

Last edited 8 years ago by serhio (previous) (diff)

comment:3 Changed 8 years ago by Scott González

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 serhio

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...

Last edited 8 years ago by serhio (previous) (diff)

comment:5 Changed 8 years ago by serhio

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"...

Note: See TracTickets for help on using tickets.