Highlighted

Date/Time field object with fixed "drop down button"

Avatar

Avatar

kc

Avatar

kc

kc

14-10-2008

Hi all,



I am trying to satisfy a customer which wants the drop down button that appear when you click inside the date/time field to be there always, not just when the user clicks inside the field. Can this be achieved and in this case how?



Thanks in advance



Sincerely

Kim

Replies

Highlighted

Avatar

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692
pguerett

14-10-2008

Nope ...the drop down button will only appear when there is focus on the field. That is the way the control works.
Highlighted

Avatar

15-10-2008

Hi, I wanted the button always visible too but I couldn´t do it so far ... also, talking about date field, I´ve been trying to lock the field so it can be edited by clicking the dropdown button only, and not by keyboard input...

I have been trying many things on the 'change' event but I still need the script to capture keyboard events ( for what i have found out, theres only a command to detect arrow key actions when you are inside a dropdown menu, but this is useless)



anyone has managed to do this?
Highlighted

Avatar

16-10-2008

ok, problem solved, didnt know the 'newText' property:



just writing this on the change event of the date field:



//-----------------

if (xfa.event.newText != null && xfa.event.newText != "")

{

var filter = /^[0-9][0-9][0-9][0-9]\/[0-9][0-9]\/[0-9][0-9]$/;

if (!filter.test(xfa.event.newText))

xfa.event.change = limpito();



}



function limpito(){

xfa.event.newText = "";

}

//----------------



cheers.
Highlighted

Avatar

Avatar

kc

Avatar

kc

kc

16-10-2008

Hi again Paul,



That is just a pity that you can't have the drop down button there always, however I have to deal with it in some other manor then.



I would really like this to be changed some day 🙂



BTW: Senators rule...



Sincerely

Kim Christensen

Dafolo A/S

Denmark