Skip to main content

Search and Top Navigation

#13107 closed bug (notabug)

Opened June 11, 2015 12:14PM UTC

Closed June 11, 2015 12:34PM UTC

Last modified June 11, 2015 02:53PM UTC

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

Attachments (0)
Change History (5)

Changed June 11, 2015 12:34PM UTC by scottgonzalez comment:1

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.

Changed June 11, 2015 02:13PM UTC by serhio comment:2

_comment0: As I understand the meeaning 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 picking a random date from the datepicker??1434032152292807
_comment1: 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 picking a random date from the datepicker??1434032202840874

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

Changed June 11, 2015 02:47PM UTC by scottgonzalez comment:3

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.

Changed June 11, 2015 02:48PM UTC by serhio comment:4

_comment0: 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 ((1434035037981408

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

Changed June 11, 2015 02:53PM UTC by serhio comment:5

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