type: datetime + readonly
type: datetime + readonly
Hi team,
here is the code:
{
label: "Heure arrivee",
name: "heure_arrivee",
def: function () { return new Date(); },
type: "datetime",
format: "HH:mm:ss",
attr: {
"readonly": true
}
},
the result is partial because I can not write in the texbox (result wanted)
but the time picker appears and with it the modification becomes possible (undesired result)
how to prevent the time picker from appearing on this textbox?
Thanks for your help
Version : Editor-PHP-1.7.2
This discussion has been closed.
Replies
Should do it. That is something that is going to be in the next release.
Allan
Hi Allan,
Thank you for your response, but it does not work
Oops - it should be:
Sorry!
Allan
Hi Allan,
In my code it doesn`t work.
Code below:
If you inspect the input element, does it show the autocomplete attribute? Could you give me a link to the page in question?
Thanks,
Allan
Hi Allan,
Yes, it show the autocomplete attribute. But I would like this date is readonly
You can check it on panel.ilare.pl
longer_ce
Hi Allan,
I'm confirm, does not work this code :
the attribute is existing :
Hi Allan,
An other idea ?
Thank you.
Hi,
I've just had a look at your page and it does appear to add both the readonly and autocomplete attributes to the input element. When I click on it the cursor isn't shown (i.e. not keyboard editable) and the calendar does open. Because I can't type in it I can't make the auto complete appear on a future edit.
What browser is it that you are using?
Thanks,
Allan
Hi Allan,
For my part, with IE v11.0 and Fiferfox v61.0.2 the phenomenon is identical.
Hi Allan,
Have you solved this issue? It is very important for my datatable.
Thanks a lot!
Even in Firefox I'm still seeing the autocomplete attribute present and I'm unable to type into the input element.
The one thing odd I do see in Firefox is that the text in the input element is white, so you can't actually see it unless it is selected. The style appears to come from forms.css line 89.
Allan
Hello Allan,
Actually keyboard input is not possible.
On the other hand, as the timepicker remains to be displayed, the modification becomes possible by selecting with the mouse the desired time with the timepicker and because of this we can change the time.
is it possible not to display the timepicker to avoid this modification by keeping the type time ?
Thanking you.
Any other suggestions on this? I too need a date time field that is read only, and do not want the calendar/time picker to come up if it's clicked.
To disable the field use
field().disable()
- that will stop keyboard input and also the picker from coming up.@SWATswat - Sorry, this dropped off my tab list so I missed the reply. Are you able to give me a link to your page so I can debug it please?
Allan
Hi Allan,
Link in the private message.
Thank you.
because of the datetime type i think this is triggering the date popup.
wouldnt you be able to create a listener tied to that input filed that triggers a prevent.default to keep the popup from opening on click?